diff options
author | Pierre Joye <pajoye@php.net> | 2009-10-01 13:55:16 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-10-01 13:55:16 +0000 |
commit | e0b392f028a36f0467989616c7b2a2a0ac452a3a (patch) | |
tree | b60232c45078df0e95f05a2e3fa49354d5c2fb08 /ext | |
parent | 5cb8e9b22a705e37436d9cb0f4c42d54cbc25a83 (diff) | |
download | php-git-e0b392f028a36f0467989616c7b2a2a0ac452a3a.tar.gz |
- fix #49732, fix crash when timestamp conversion fails
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fileinfo/libmagic/readcdf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c index 20462f3286..a12fa9c9b3 100644 --- a/ext/fileinfo/libmagic/readcdf.c +++ b/ext/fileinfo/libmagic/readcdf.c @@ -125,7 +125,10 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, return -1; } else { char *c, *ec; - cdf_timestamp_to_timespec(&ts, tp); + + if (cdf_timestamp_to_timespec(&ts, tp) == -1) { + return -1; + } c = ctime(&ts.tv_sec); if ((ec = strchr(c, '\n')) != NULL) *ec = '\0'; |