]> granicus.if.org Git - php/commitdiff
fix NULL deref
authorAnatol Belski <ab@php.net>
Tue, 1 Aug 2017 09:55:32 +0000 (11:55 +0200)
committerAnatol Belski <ab@php.net>
Tue, 1 Aug 2017 09:55:32 +0000 (11:55 +0200)
ext/exif/exif.c

index adfb539b3720e32c40b1f7b73537d0f58e208509..306b94dbe2b30552c836c631bd098f8bf5e924bb 100644 (file)
@@ -1973,11 +1973,11 @@ static void exif_error_docref(const char *docref EXIFERR_DC, const image_info_ty
                char *buf;
 
                spprintf(&buf, 0, "%s(%d): %s", _file, _line, format);
-               php_verror(docref, ImageInfo->FileName?ImageInfo->FileName:"", type, buf, args);
+               php_verror(docref, ImageInfo && ImageInfo->FileName ? ImageInfo->FileName:"", type, buf, args);
                efree(buf);
        }
 #else
-       php_verror(docref, ImageInfo->FileName?ImageInfo->FileName:"", type, format, args);
+       php_verror(docref, ImageInfo && ImageInfo->FileName ? ImageInfo->FileName:"", type, format, args);
 #endif
        va_end(args);
 }