diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-04-09 15:46:12 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-04-09 15:46:12 +0100 |
commit | ae20c80970d513823f3d36e73ec9657bf4b0e197 (patch) | |
tree | 7ce757e306a031eba0987981e4c829c3d562f928 | |
parent | b9d9c5a27bea03802901872e0e056fb97b4c30a6 (diff) |
Tidying: coverity issues
-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; |