mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
- Handle error if tempfile can't be opened, found by parfait
This commit is contained in:
parent
0f7d022eea
commit
ac96bcdc90
1 changed files with 3 additions and 0 deletions
|
@ -411,6 +411,9 @@ foundit:
|
||||||
now = php_stream_tell(fp);
|
now = php_stream_tell(fp);
|
||||||
pefree(entry.filename, entry.is_persistent);
|
pefree(entry.filename, entry.is_persistent);
|
||||||
sigfile = php_stream_fopen_tmpfile();
|
sigfile = php_stream_fopen_tmpfile();
|
||||||
|
if (!sigfile) {
|
||||||
|
PHAR_ZIP_FAIL("couldn't open temporary file");
|
||||||
|
}
|
||||||
|
|
||||||
php_stream_seek(fp, 0, SEEK_SET);
|
php_stream_seek(fp, 0, SEEK_SET);
|
||||||
/* copy file contents + local headers and zip comment, if any, to be hashed for signature */
|
/* copy file contents + local headers and zip comment, if any, to be hashed for signature */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue