- fix #49732, fix crash when timestamp conversion fails

This commit is contained in:
Pierre Joye 2009-10-01 13:55:16 +00:00
parent 5cb8e9b22a
commit e0b392f028
2 changed files with 9 additions and 2 deletions

6
NEWS
View File

@ -12,6 +12,9 @@
(Rasmus)
- Fixed a open_basedir bypass in posix_mkfifo() identified by Grzegorz
Stachowiak. (Rasmus)
- Fixed bug #49732 (crashes when using fileinfo when timestamp conversion
fails). (Pierre)
- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus)
- Fixed bug #49647 (DOMUserData does not exist). (Rob)
- Fixed bug #49630 (imap_listscan function missing). (Felipe)
@ -21,7 +24,8 @@
fclose). (Ilia)
- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
?? ??? 2009, PHP 5.3.1RC? <- WHY IS THIS HERE? Gonna be released after 5.3.1 or what??
?? ??? 2009, PHP 5.3.1RC? < WILL BE MERGED LATER
- Upgraded bundled sqlite to version 3.6.18. (Ilia)
- Restored shebang line check to CGI sapi (not checked by scanner anymore).
(Jani)

View File

@ -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';