From: Pierre Joye Date: Thu, 1 Oct 2009 13:55:16 +0000 (+0000) Subject: - fix #49732, fix crash when timestamp conversion fails X-Git-Tag: php-5.4.0alpha1~191^2~2553 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13bdff44bcbb17a833022b71926cd5bb36875d12;p=php - fix #49732, fix crash when timestamp conversion fails --- 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';