projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22ab321
)
In parse_header_time(), zero out gmt before each strptime() just to be sure
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 4 Sep 2011 11:33:50 +0000
(11:33 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 4 Sep 2011 11:33:50 +0000
(11:33 +0000)
parsers.c
patch
|
blob
|
history
diff --git
a/parsers.c
b/parsers.c
index
6e9645e
..
a6a721f
100644
(file)
--- a/
parsers.c
+++ b/
parsers.c
@@
-1,4
+1,4
@@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.23
0 2011/09/04 11:32:20
fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.23
1 2011/09/04 11:33:06
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@
-4027,14
+4027,14
@@
static jb_err parse_header_time(const char *header_time, time_t *result)
};
unsigned int i;
};
unsigned int i;
- /*
- * Zero out gmt to prevent time zone offsets.
- * Documented to be required for GNU libc.
- */
- memset(&gmt, 0, sizeof(gmt));
-
for (i = 0; i < SZ(time_formats); i++)
{
for (i = 0; i < SZ(time_formats); i++)
{
+ /*
+ * Zero out gmt to prevent time zone offsets.
+ * Documented to be required for GNU libc.
+ */
+ memset(&gmt, 0, sizeof(gmt));
+
if (NULL != strptime(header_time, time_formats[i], &gmt))
{
/* Sanity check for GNU libc. */
if (NULL != strptime(header_time, time_formats[i], &gmt))
{
/* Sanity check for GNU libc. */