File lsb-misctest-bof-security_101.patch of Package lsb-misctest
Index: appchk/output.c
===================================================================
--- appchk/output.c.orig 2008-10-08 14:36:57.000000000 +0200
+++ appchk/output.c 2008-10-17 02:14:19.000000000 +0200
@@ -341,7 +341,9 @@ void output_purpose_end(unsigned int act
if (current_purpose != NULL) {
prepared = stringprep(current_purpose);
snprintf(purposebuf, PATH_MAX, "&purpose=%s", prepared);
- strncat(urlbuf, purposebuf, PATH_MAX);
+ snprintf(urlbuf, PATH_MAX, "%s%s", urlbuf, purposebuf);
+ urlbuf[PATH_MAX-1] = '\0'; /* Ensure null termination */
+
}
fprintf(output_file, " %s\n", translate_result(current_result));