Skip to content

Commit f7096c4

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix #80366: Return Value of zend_fstat() not Checked
2 parents 3763255 + deb8b81 commit f7096c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)