Fix possible harmful warning: the value of the size argument in 'strncat' is too large, change the argument to be the free space in the destination buffer minus the terminating null byte

This commit is contained in:
Jens Verwiebe
2014-08-05 12:03:31 +02:00
parent b3e3ca7464
commit 5efa7fa534

View File

@@ -686,7 +686,7 @@ int cuewCompilerVersion(void) {
while (!feof(pipe)) {
if (fgets(buf, sizeof(buf), pipe) != NULL) {
strncat(output, buf, sizeof(output) - strlen(output));
strncat(output, buf, sizeof(output) - strlen(output) - 1 );
}
}