Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80366: Return Value of zend_fstat() not Checked
This commit is contained in:
Christoph M. Becker 2020-11-24 13:10:18 +01:00
commit deb8b8190e
2 changed files with 6 additions and 1 deletions

3
NEWS
View file

@ -12,6 +12,9 @@ PHP NEWS
. Fixed bug #80404 (Incorrect range inference result when division results
in float). (Nikita)
- Standard:
. Fixed bug #80366 (Return Value of zend_fstat() not Checked). (sagpant, cmb)
- Tidy:
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)

View file

@ -203,7 +203,9 @@ PHP_FUNCTION(iptcembed)
}
if (spool < 2) {
zend_fstat(fileno(fp), &sb);
if (zend_fstat(fileno(fp), &sb) != 0) {
RETURN_FALSE;
}
spoolbuf = zend_string_safe_alloc(1, iptcdata_len + sizeof(psheader) + 1024 + 1, sb.st_size, 0);
poi = (unsigned char*)ZSTR_VAL(spoolbuf);