projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
988422b
)
parse_header_time(): Use privoxy_gmtime_r()
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 7 Jun 2020 15:57:40 +0000
(17:57 +0200)
committer
Fabian Keil
<fk@fabiankeil.de>
Mon, 8 Jun 2020 13:34:36 +0000
(15:34 +0200)
Previously the function would use gmtime() unlocked
if FEATURE_STRPTIME_SANITY_CHECKS was enabled ...
parsers.c
patch
|
blob
|
history
diff --git
a/parsers.c
b/parsers.c
index
6b93b74
..
15abc40
100644
(file)
--- a/
parsers.c
+++ b/
parsers.c
@@
-4356,9
+4356,10
@@
static jb_err parse_header_time(const char *header_time, time_t *result)
{
char recreated_date[100];
struct tm *tm;
+ struct tm storage;
time_t result2;
- tm =
gmtime(result
);
+ tm =
privoxy_gmtime_r(result, &storage
);
if (!strftime(recreated_date, sizeof(recreated_date),
time_formats[i], tm))
{