pajoye Sun, 19 Jul 2009 15:32:51 +0000 URL: http://svn.php.net/viewvc?view=revision&revision=284365
Changed paths: U php/php-src/trunk/ext/zip/lib/zip_close.c Log: - MFB: Fix #48763, create corrupt archive Modified: php/php-src/trunk/ext/zip/lib/zip_close.c =================================================================== --- php/php-src/trunk/ext/zip/lib/zip_close.c 2009-07-19 15:32:09 UTC (rev 284364) +++ php/php-src/trunk/ext/zip/lib/zip_close.c 2009-07-19 15:32:51 UTC (rev 284365) @@ -175,6 +175,7 @@ de.filename = strdup("-"); de.filename_len = 1; cd->entry[j].filename = "-"; + cd->entry[j].filename_len = 1; } else { de.filename = strdup(za->cdir->entry[i].filename); @@ -195,13 +196,15 @@ error = 1; break; } + memcpy(cd->entry+j, za->cdir->entry+i, sizeof(cd->entry[j])); + if (de.bitflags & ZIP_GPBF_DATA_DESCRIPTOR) { de.crc = za->cdir->entry[i].crc; de.comp_size = za->cdir->entry[i].comp_size; de.uncomp_size = za->cdir->entry[i].uncomp_size; de.bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR; - } - memcpy(cd->entry+j, za->cdir->entry+i, sizeof(cd->entry[j])); + cd->entry[j].bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR; + } } if (za->entry[i].ch_filename) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php