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 | 13bdff44bcbb17a833022b71926cd5bb36875d12 (patch) | |
| tree | beac1e3a2169525bfe3b0f10651118dde12d72f8 | |
| parent | 54b4cf2532c7a94d8e1590dd4ca87f53f1a6f4c0 (diff) | |
| download | php-git-13bdff44bcbb17a833022b71926cd5bb36875d12.tar.gz | |
- fix #49732, fix crash when timestamp conversion fails
| -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 11b362f02a..cf7ee0be4f 100644 --- a/ext/fileinfo/libmagic/readcdf.c +++ b/ext/fileinfo/libmagic/readcdf.c @@ -123,7 +123,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'; |
