svn: /php/php-src/ branches/PHP_5_3/ext/phar/zip.c branches/PHP_5_4/ext/phar/zip.c trunk/ext/phar/zip.c

From: Date: Mon, 16 May 2011 22:24:41 +0000
Subject: svn: /php/php-src/ branches/PHP_5_3/ext/phar/zip.c branches/PHP_5_4/ext/phar/zip.c trunk/ext/phar/zip.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-64956@lists.php.net to get a copy of this message
johannes Mon, 16 May 2011 22:24:41 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=311112 Log: - Handle error if tempfile can't be opened, found by parfait Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/zip.c U php/php-src/branches/PHP_5_4/ext/phar/zip.c U php/php-src/trunk/ext/phar/zip.c Modified: php/php-src/branches/PHP_5_3/ext/phar/zip.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/phar/zip.c 2011-05-16 22:15:36 UTC (rev 311111) +++ php/php-src/branches/PHP_5_3/ext/phar/zip.c 2011-05-16 22:24:41 UTC (rev 311112) @@ -411,6 +411,9 @@ now = php_stream_tell(fp); pefree(entry.filename, entry.is_persistent); sigfile = php_stream_fopen_tmpfile(); + if (!sigfile) { + PHAR_ZIP_FAIL("couldn't open temporary file"); + } php_stream_seek(fp, 0, SEEK_SET); /* copy file contents + local headers and zip comment, if any, to be hashed for signature */ Modified: php/php-src/branches/PHP_5_4/ext/phar/zip.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/phar/zip.c 2011-05-16 22:15:36 UTC (rev 311111) +++ php/php-src/branches/PHP_5_4/ext/phar/zip.c 2011-05-16 22:24:41 UTC (rev 311112) @@ -411,6 +411,9 @@ now = php_stream_tell(fp); pefree(entry.filename, entry.is_persistent); sigfile = php_stream_fopen_tmpfile(); + if (!sigfile) { + PHAR_ZIP_FAIL("couldn't open temporary file"); + } php_stream_seek(fp, 0, SEEK_SET); /* copy file contents + local headers and zip comment, if any, to be hashed for signature */ Modified: php/php-src/trunk/ext/phar/zip.c =================================================================== --- php/php-src/trunk/ext/phar/zip.c 2011-05-16 22:15:36 UTC (rev 311111) +++ php/php-src/trunk/ext/phar/zip.c 2011-05-16 22:24:41 UTC (rev 311112) @@ -411,6 +411,9 @@ now = php_stream_tell(fp); pefree(entry.filename, entry.is_persistent); sigfile = php_stream_fopen_tmpfile(); + if (!sigfile) { + PHAR_ZIP_FAIL("couldn't open temporary file"); + } php_stream_seek(fp, 0, SEEK_SET); /* copy file contents + local headers and zip comment, if any, to be hashed for signature */

« previous php.cvs (#64956) next »