projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee71109
)
Make sure zip_path is null-terminated, since it's on the stack
author
Neal Norwitz
<nnorwitz@gmail.com>
Tue, 31 Dec 2002 12:35:41 +0000
(12:35 +0000)
committer
Neal Norwitz
<nnorwitz@gmail.com>
Tue, 31 Dec 2002 12:35:41 +0000
(12:35 +0000)
PC/getpathp.c
patch
|
blob
|
history
diff --git
a/PC/getpathp.c
b/PC/getpathp.c
index 4930ad825837412705907f3634af5b15ca7f01c3..ed0a75552236b197527c50327ca66a1bf1a579ff 100644
(file)
--- a/
PC/getpathp.c
+++ b/
PC/getpathp.c
@@
-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" */