diff options
-rw-r--r-- | src/src/buildconfig.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/src/buildconfig.c b/src/src/buildconfig.c index 3a45cac18..4ed287414 100644 --- a/src/src/buildconfig.c +++ b/src/src/buildconfig.c @@ -825,7 +825,11 @@ else if (isgroup) strncpy(buffer, ss, sss-ss); buffer[sss-ss] = 0; /* For empty case */ } - else strcpy(buffer, ss); + else + { + strncpy(buffer, ss, sizeof(buffer)); + buffer[sizeof(buffer)-1] = 0; + } pp = buffer + (int)strlen(buffer); while (pp > buffer && isspace((unsigned char)pp[-1])) pp--; *pp = 0; |