Patch iptc_fix.patch for GetImageSize related Bug #80366
Patch version 2020-11-13 19:32 UTC
Return to Bug #80366 |
Download this patch
Patch Revisions:
Developer: sagpant@microsoft.com
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index f3c17dadd9..41d6645831 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -216,9 +216,7 @@ PHP_FUNCTION(iptcembed)
RETURN_FALSE;
}
- if (spool < 2) {
- zend_fstat(fileno(fp), &sb);
-
+ if (spool < 2 && zend_fstat(fileno(fp), &sb) == 0) {
spoolbuf = zend_string_safe_alloc(1, iptcdata_len + sizeof(psheader) + 1024 + 1, sb.st_size, 0);
poi = (unsigned char*)ZSTR_VAL(spoolbuf);
memset(poi, 0, iptcdata_len + sizeof(psheader) + sb.st_size + 1024 + 1);
|