summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-10-01 13:55:16 +0000
committerPierre Joye <pajoye@php.net>2009-10-01 13:55:16 +0000
commit13bdff44bcbb17a833022b71926cd5bb36875d12 (patch)
treebeac1e3a2169525bfe3b0f10651118dde12d72f8
parent54b4cf2532c7a94d8e1590dd4ca87f53f1a6f4c0 (diff)
downloadphp-git-13bdff44bcbb17a833022b71926cd5bb36875d12.tar.gz
- fix #49732, fix crash when timestamp conversion fails
-rw-r--r--ext/fileinfo/libmagic/readcdf.c5
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';