cvs: php-src /ext/phar zip.c
| From: | Greg Beaver | Date: | Mon, 22 Sep 2008 01:40:51 +0000 |
| Subject: | cvs: php-src /ext/phar zip.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-53239@lists.php.net to get a copy of this message | ||
cellog Mon Sep 22 01:40:51 2008 UTC
Modified files:
/php-src/ext/phar zip.c
Log:
MF53: workaround for Bug #46147 for PHP < 5.2.7
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.54&r2=1.55&diff_format=u
Index: php-src/ext/phar/zip.c
diff -u php-src/ext/phar/zip.c:1.54 php-src/ext/phar/zip.c:1.55
--- php-src/ext/phar/zip.c:1.54 Sun Sep 14 06:32:52 2008
+++ php-src/ext/phar/zip.c Mon Sep 22 01:40:51 2008
@@ -484,6 +484,10 @@
/* construct actual offset to file start - local extra_len can be different from central
extra_len */
entry.offset = entry.offset_abs =
sizeof(local) + entry.header_offset + PHAR_GET_16(local.filename_len) +
PHAR_GET_16(local.extra_len);
+#if PHP_VERSION_ID < 50207
+ /* work around Bug #46147 */
+ fp->writepos = fp->readpos = 0;
+#endif
php_stream_seek(fp, entry.offset, SEEK_SET);
mydata->alias_len = entry.uncompressed_filesize;