Skip to content
Permalink
Browse files Browse the repository at this point in the history
added empty strign check, which would lead to NULL ptr deref/crash in…
… exif XML display. fixes #4
  • Loading branch information
msmeissn committed Feb 25, 2021
1 parent 5091d97 commit f6334d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exif/actions.c
Expand Up @@ -661,6 +661,8 @@ escape_xml(const char *text)
char *out;
size_t len;

if (!strlen(text)) return "empty string";

for (out=escaped, len=0; *text; ++len, ++out, ++text) {
/* Make sure there's plenty of room for a quoted character */
if ((len + 8) > escaped_size) {
Expand Down

0 comments on commit f6334d9

Please sign in to comment.