[Python-checkins] python/dist/src/PC getpathp.c,1.29,1.30
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Tue, 31 Dec 2002 04:35:44 -0800
Update of /cvsroot/python/python/dist/src/PC
In directory sc8-pr-cvs1:/tmp/cvs-serv16938/PC
Modified Files:
getpathp.c
Log Message:
Make sure zip_path is null-terminated, since it's on the stack
Index: getpathp.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/PC/getpathp.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** getpathp.c 30 Dec 2002 22:08:04 -0000 1.29
--- getpathp.c 31 Dec 2002 12:35:41 -0000 1.30
***************
*** 468,471 ****
--- 468,472 ----
else /* use name of executable program */
strncpy(zip_path, progpath, MAXPATHLEN);
+ zip_path[MAXPATHLEN] = '\0';
len = strlen(zip_path);
if (len > 4) {