Commit a8aed02f authored by Neal Norwitz's avatar Neal Norwitz

Make sure zip_path is null-terminated, since it's on the stack

parent ee711092
......@@ -467,6 +467,7 @@ calculate_path(void)
strncpy(zip_path, dllpath, MAXPATHLEN);
else /* use name of executable program */
strncpy(zip_path, progpath, MAXPATHLEN);
zip_path[MAXPATHLEN] = '\0';
len = strlen(zip_path);
if (len > 4) {
zip_path[len-3] = 'z'; /* change ending to "zip" */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment