From 5efa7fa534c343a50e2fc62d76de171cd808bae2 Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Tue, 5 Aug 2014 12:03:31 +0200 Subject: 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 --- extern/cuew/src/cuew.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extern/cuew/src') diff --git a/extern/cuew/src/cuew.c b/extern/cuew/src/cuew.c index 9ba65ac310a..da892efc0f4 100644 --- a/extern/cuew/src/cuew.c +++ b/extern/cuew/src/cuew.c @@ -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 ); } } -- cgit v1.2.3