[Python-checkins] python/dist/src/Modules getpath.c,1.45,1.46

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Tue, 31 Dec 2002 04:45:15 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv21887/Modules

Modified Files:
	getpath.c 
Log Message:
Make sure zip_path is null-terminated, since it's on the stack

Index: getpath.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** getpath.c	30 Dec 2002 22:08:03 -0000	1.45
--- getpath.c	31 Dec 2002 12:45:12 -0000	1.46
***************
*** 486,489 ****
--- 486,490 ----
  
      strncpy(zip_path, prefix, MAXPATHLEN);
+     zip_path[MAXPATHLEN] = '\0';
      if (pfound > 0) { /* Use the reduced prefix returned by Py_GetPrefix() */
          reduce(zip_path);