pajoye                                   Fri, 09 Oct 2009 14:51:25 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=289425

Log:
- Merge: Fix #49732, Crashes in fileinfo when corrupted files are given 
(timestamp fails)

Bug: http://bugs.php.net/49732 (Closed) PHP crashes when using finfo_file() to 
get mime info with this file (included)
      
Changed paths:
    U   php/php-src/branches/PHP_5_3_1/ext/fileinfo/libmagic/readcdf.c

Modified: php/php-src/branches/PHP_5_3_1/ext/fileinfo/libmagic/readcdf.c
===================================================================
--- php/php-src/branches/PHP_5_3_1/ext/fileinfo/libmagic/readcdf.c      
2009-10-09 14:46:48 UTC (rev 289424)
+++ php/php-src/branches/PHP_5_3_1/ext/fileinfo/libmagic/readcdf.c      
2009-10-09 14:51:25 UTC (rev 289425)
@@ -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';

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to