Browse Source

- Handle error if tempfile can't be opened, found by parfait

pull/271/head
Johannes Schlüter 15 years ago
parent
commit
ac96bcdc90
  1. 3
      ext/phar/zip.c

3
ext/phar/zip.c

@ -411,6 +411,9 @@ foundit:
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 */

Loading…
Cancel
Save