Skip to content

Commit

Permalink
fix NULL deref
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Aug 1, 2017
1 parent 5856bec commit ce1a0d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/exif/exif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ce1a0d9

Please sign in to comment.