summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-11-24 13:10:18 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-11-24 13:10:35 +0100
commitdeb8b8190ed2b0ba34179d80d73a95beaefc6efc (patch)
treea5891ad936883fa53a8b2b493c117ba39da45f2a
parentb91bf2233320d36cfb06d79f61c57b6bde281567 (diff)
parent5f9c82d514980f96e5e88f6c2633571ce31b57a7 (diff)
downloadphp-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--NEWS3
-rw-r--r--ext/standard/iptc.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a8b4bf3657..dedf314ed1 100644
--- a/NEWS
+++ b/NEWS
@@ -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);