summaryrefslogtreecommitdiff
path: root/ext
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
commite0b392f028a36f0467989616c7b2a2a0ac452a3a (patch)
treeb60232c45078df0e95f05a2e3fa49354d5c2fb08 /ext
parent5cb8e9b22a705e37436d9cb0f4c42d54cbc25a83 (diff)
downloadphp-git-e0b392f028a36f0467989616c7b2a2a0ac452a3a.tar.gz
- fix #49732, fix crash when timestamp conversion fails
Diffstat (limited to 'ext')
-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 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';