Commit: 63e58b6f3f46166b3dd826130e69c0569d787233 Author: Pierre Joye <pierre....@gmail.com> Tue, 27 Mar 2012 14:02:35 +0200 Parents: cfb2df5fb7b833b7a1c55e31ee22c8c9d542bb29 a8174653e33479c850342cd9f9b5e7898f52ad8d Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=63e58b6f3f46166b3dd826130e69c0569d787233 Log: Merge branch 'PHP-5.4' * PHP-5.4: - fix test for 5.11 Fix bug #61504, potential vuln. in fileinfo. update to 5.11 Bugs: https://bugs.php.net/61504 Changed paths: MM ext/fileinfo/libmagic/print.c Diff: 63e58b6f3f46166b3dd826130e69c0569d787233 diff --combined ext/fileinfo/libmagic/print.c index 2688665,8370f50..89c51b0 --- a/ext/fileinfo/libmagic/print.c +++ b/ext/fileinfo/libmagic/print.c @@@ -28,13 -28,14 +28,13 @@@ /* * print.c - debugging printout routines */ - #define _GNU_SOURCE #include "php.h" #include "file.h" #ifndef lint - FILE_RCSID("@(#)$File: print.c,v 1.66 2009/02/03 20:27:51 christos Exp $") + FILE_RCSID("@(#)$File: print.c,v 1.71 2011/09/20 15:28:09 christos Exp $") #endif /* lint */ #include <stdio.h> @@@ -85,7 -86,7 +85,7 @@@ file_fmttime(uint32_t v, int local (void)time(&now); tm1 = localtime(&now); if (tm1 == NULL) - return "*Invalid time*"; + goto out; daylight = tm1->tm_isdst; } #endif /* HAVE_TM_ISDST */ @@@ -94,10 -95,14 +94,14 @@@ t += 3600; tm = gmtime(&t); if (tm == NULL) - return "*Invalid time*"; + goto out; pp = asctime(tm); } + if (pp == NULL) + goto out; pp[strcspn(pp, "\n")] = '\0'; return pp; + out: + return "*Invalid time*"; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php