diff options
author | Johannes Schlüter <johannes@php.net> | 2011-05-16 22:24:41 +0000 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2011-05-16 22:24:41 +0000 |
commit | c61d1259864bf9abc73c2d8cd953e1d262b7ba0e (patch) | |
tree | ff82b7d75a280f98fc64a34f1e839aeccd891cea /ext/phar | |
parent | 38c1181cfab762136a35aed793a8c785d5d4a56f (diff) | |
download | php-git-c61d1259864bf9abc73c2d8cd953e1d262b7ba0e.tar.gz |
- Handle error if tempfile can't be opened, found by parfait
Diffstat (limited to 'ext/phar')
-rw-r--r-- | ext/phar/zip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/phar/zip.c b/ext/phar/zip.c index fa3642f5c7..a8ac63aeb2 100644 --- a/ext/phar/zip.c +++ b/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 */ |