Tidying: coverity issues
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 9 Apr 2016 14:46:12 +0000 (15:46 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 9 Apr 2016 14:46:12 +0000 (15:46 +0100)
src/src/buildconfig.c

index 3a45cac..4ed2874 100644 (file)
@@ -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;