com php-src: Reworked the changes for bug #64452: ext/zip/lib/z ip_close.c

From: Date: Sat, 23 Mar 2013 19:57:59 +0000
Subject: com php-src: Reworked the changes for bug #64452: ext/zip/lib/z ip_close.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-71703@lists.php.net to get a copy of this message
Commit: 638c4b89b7f33a86b45b02f72ee42b25a439863b Author: Anatol Belski <ab@php.net> Sat, 23 Mar 2013 20:57:59 +0100 Parents: b022e54bd100a914417e216d0872d3e67edecaf9 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=638c4b89b7f33a86b45b02f72ee42b25a439863b Log: Reworked the changes for bug #64452 Bugs: https://bugs.php.net/64452 Changed paths: M ext/zip/lib/zip_close.c Diff: diff --git a/ext/zip/lib/zip_close.c b/ext/zip/lib/zip_close.c index e66c566..576be3b 100644 --- a/ext/zip/lib/zip_close.c +++ b/ext/zip/lib/zip_close.c @@ -88,9 +88,6 @@ zip_close(struct zip *za) if (za == NULL) return -1; - if (za->zp == NULL) - return -1; - if (!_zip_changed(za, &survivors)) { _zip_free(za); return 0; @@ -196,7 +193,7 @@ zip_close(struct zip *za) } else { /* copy existing directory entries */ - if (fseeko(za->zp, za->cdir->entry[i].offset, SEEK_SET) != 0) { + if ((NULL == za->zp) || (fseeko(za->zp, za->cdir->entry[i].offset, SEEK_SET) != 0)) { _zip_error_set(&za->error, ZIP_ER_SEEK, errno); error = 1; break;

« previous php.cvs (#71703) next »