1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: ext/fileinfo/libmagic/readcdf.c
===================================================================
--- ext/fileinfo/libmagic/readcdf.c  (revision 288722)
+++ ext/fileinfo/libmagic/readcdf.c  (working copy)
@@ -125,7 +125,10 @@
             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';