diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-24 13:10:18 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-24 13:10:35 +0100 |
commit | deb8b8190ed2b0ba34179d80d73a95beaefc6efc (patch) | |
tree | a5891ad936883fa53a8b2b493c117ba39da45f2a | |
parent | b91bf2233320d36cfb06d79f61c57b6bde281567 (diff) | |
parent | 5f9c82d514980f96e5e88f6c2633571ce31b57a7 (diff) | |
download | php-git-deb8b8190ed2b0ba34179d80d73a95beaefc6efc.tar.gz |
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80366: Return Value of zend_fstat() not Checked
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | ext/standard/iptc.c | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -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) diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 6e9df19c30..b4890238f8 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -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); |