Browse Source

Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  php_stream_fopen_tmpfile may file, causing any following stream usage to crash
pull/315/merge
Pierre Joye 13 years ago
parent
commit
f37c54ab27
  1. 4
      ext/phar/zip.c

4
ext/phar/zip.c

@ -1122,6 +1122,10 @@ static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pas
entry.fp = php_stream_fopen_tmpfile();
entry.fp_type = PHAR_MOD;
entry.is_modified = 1;
if (entry.fp == NULL) {
spprintf(pass->error, 0, "phar error: unable to create temporary file for signature");
return FAILURE;
}
PHAR_SET_32(sigbuf, phar->sig_flags);
PHAR_SET_32(sigbuf + 4, signature_length);

Loading…
Cancel
Save