1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00

Merge branch 'PHP-5.5'

* PHP-5.5:
  entry for #64214
  other fix for #64214, unmodified file may not have old fp set, causing other possible crashes
This commit is contained in:
Pierre Joye
2013-05-17 11:51:18 +02:00
+5 -4
View File
@@ -937,10 +937,11 @@ is_compressed:
PHAR_SET_32(local.uncompsize, entry->uncompressed_filesize);
PHAR_SET_32(central.compsize, entry->compressed_filesize);
PHAR_SET_32(local.compsize, entry->compressed_filesize);
if (-1 == php_stream_seek(p->old, entry->offset_abs, SEEK_SET)) {
spprintf(p->error, 0, "unable to seek to start of file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fname);
return ZEND_HASH_APPLY_STOP;
if (p->old) {
if (-1 == php_stream_seek(p->old, entry->offset_abs, SEEK_SET)) {
spprintf(p->error, 0, "unable to seek to start of file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fname);
return ZEND_HASH_APPLY_STOP;
}
}
}
not_compressed: