current parsers.c,1.308,1.309
Fabian Keil <[email protected]>
| Newsgroups | gmane.comp.web.privoxy.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ijbswa/current
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11888
Modified Files:
parsers.c
Log Message:
parse_header_time(): Explicitly check for strftime() failures when sanity-checking strptime()
Index: parsers.c
===================================================================
RCS file: /cvsroot/ijbswa/current/parsers.c,v
retrieving revision 1.308
retrieving revision 1.309
diff -C2 -d -r1.308 -r1.309
*** parsers.c 26 Feb 2016 12:31:12 -0000 1.308
--- parsers.c 30 Apr 2016 10:28:36 -0000 1.309
***************
*** 4314,4318 ****
tm = gmtime(result);
! strftime(recreated_date, sizeof(recreated_date), time_formats[i], tm);
memset(&gmt, 0, sizeof(gmt));
if (NULL == strptime(recreated_date, time_formats[i], &gmt))
--- 4314,4324 ----
tm = gmtime(result);
! if (!strftime(recreated_date, sizeof(recreated_date),
! time_formats[i], tm))
! {
! log_error(LOG_LEVEL_ERROR, "Failed to recreate date '%s' with '%s'.",
! header_time, time_formats[i]);
! continue;
! }
memset(&gmt, 0, sizeof(gmt));
if (NULL == strptime(recreated_date, time_formats[i], &gmt))
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z