Skip to content

Commit

Permalink
backport this piece from 5.6, related to the #66307 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Apr 24, 2014
1 parent 03fa550 commit d7bb09c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/fileinfo/libmagic/readcdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
return -1;
}
c = cdf_ctime(&sec, tbuf);
if ((ec = strchr(c, '\n')) != NULL)
if (c != NULL &&
(ec = strchr(c, '\n')) != NULL)
*ec = '\0';

if (NOTMIME(ms) && file_printf(ms,
Expand Down

0 comments on commit d7bb09c

Please sign in to comment.