From: Anatol Belski Date: Tue, 1 Aug 2017 09:55:32 +0000 (+0200) Subject: fix NULL deref X-Git-Tag: php-7.2.0beta2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce1a0d97;p=php fix NULL deref --- diff --git a/ext/exif/exif.c b/ext/exif/exif.c index adfb539b37..306b94dbe2 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -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); }