Index: zipimport.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/zipimport.c,v retrieving revision 1.14 diff -c -r1.14 zipimport.c *** zipimport.c 10 May 2003 07:36:55 -0000 1.14 --- zipimport.c 22 Jul 2003 13:35:06 -0000 *************** *** 660,665 **** --- 660,666 ---- char path[MAXPATHLEN + 5]; char name[MAXPATHLEN + 5]; char *p, endof_central_dir[22]; + long arc_offset; /* Offset from beginning of file to start of zip-archive */ if (strlen(archive)> MAXPATHLEN) { PyErr_SetString(PyExc_OverflowError, *************** *** 690,696 **** --- 691,700 ---- return NULL; } + header_size = get_long((unsigned char *)endof_central_dir + 12); header_offset = get_long((unsigned char *)endof_central_dir + 16); + arc_offset = header_end - header_offset - header_size; + header_offset += arc_offset; files = PyDict_New(); if (files == NULL) *************** *** 721,727 **** PyMarshal_ReadShortFromFile(fp) + PyMarshal_ReadShortFromFile(fp); fseek(fp, header_offset + 42, 0); ! file_offset = PyMarshal_ReadLongFromFile(fp); if (name_size> MAXPATHLEN) name_size = MAXPATHLEN; --- 725,731 ---- PyMarshal_ReadShortFromFile(fp) + PyMarshal_ReadShortFromFile(fp); fseek(fp, header_offset + 42, 0); ! file_offset = PyMarshal_ReadLongFromFile(fp) + arc_offset; if (name_size> MAXPATHLEN) name_size = MAXPATHLEN;