From: Greg Beaver Date: Mon, 22 Sep 2008 01:40:51 +0000 (+0000) Subject: MF53: workaround for Bug #46147 for PHP < 5.2.7 X-Git-Tag: BEFORE_HEAD_NS_CHANGE~344 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0653e0a14280b1d0fa68dbada733a8771ba88722;p=php MF53: workaround for Bug #46147 for PHP < 5.2.7 --- diff --git a/ext/phar/zip.c b/ext/phar/zip.c index a685d995da..221a806f55 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -484,6 +484,10 @@ foundit: /* 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;