com php-src: fix NULL deref: ext/exif/exif.c
| From: | Anatol Belski | Date: | Tue, 01 Aug 2017 09:55:32 +0000 |
| Subject: | com php-src: fix NULL deref: ext/exif/exif.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98885@lists.php.net to get a copy of this message | ||
Commit: ce1a0d971b018c0adf28095d86aea6776b5188a1
Author: Anatol Belski <ab@php.net> Tue, 1 Aug 2017 11:55:32 +0200
Parents: 5856becc2b9bcffcbfd09a913821dda37c1af5f9
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ce1a0d971b018c0adf28095d86aea6776b5188a1
Log:
fix NULL deref
Changed paths:
M ext/exif/exif.c
Diff:
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index adfb539..306b94d 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);
}