Skip to content

Commit deb8b81

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #80366: Return Value of zend_fstat() not Checked
2 parents b91bf22 + 5f9c82d commit deb8b81

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ PHP NEWS
1212
. Fixed bug #80404 (Incorrect range inference result when division results
1313
in float). (Nikita)
1414

15+
- Standard:
16+
. Fixed bug #80366 (Return Value of zend_fstat() not Checked). (sagpant, cmb)
17+
1518
- Tidy:
1619
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)
1720

ext/standard/iptc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ PHP_FUNCTION(iptcembed)
203203
}
204204

205205
if (spool < 2) {
206-
zend_fstat(fileno(fp), &sb);
206+
if (zend_fstat(fileno(fp), &sb) != 0) {
207+
RETURN_FALSE;
208+
}
207209

208210
spoolbuf = zend_string_safe_alloc(1, iptcdata_len + sizeof(psheader) + 1024 + 1, sb.st_size, 0);
209211
poi = (unsigned char*)ZSTR_VAL(spoolbuf);

0 commit comments

Comments
 (0)