In the somewhat unlikely case that `zend_fstat()` fails, we must not
proceed executing the function, but return `false` instead.
Patch based on the patch contributed by sagpant at microsoft dot com.
Closes GH-6432.
. Fixed bug #80362 (Running dtrace scripts can cause php to crash).
(al at coralnet dot name)
+- Standard:
+ . Fixed bug #80366 (Return Value of zend_fstat() not Checked). (sagpant, cmb)
+
- Tidy:
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)
}
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);