From 4564636781cbb1f8735bc636ff8ba1719ad10ace Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Sat, 5 Nov 2016 23:05:52 -0400 Subject: easy: Initialize info variables on easy init and duphandle - Call Curl_initinfo on init and duphandle. Prior to this change the statistical and informational variables were simply zeroed by calloc on easy init and duphandle. While zero is the correct default value for almost all info variables, there is one where it isn't (filetime initializes to -1). Bug: https://github.com/curl/curl/issues/1103 Reported-by: Neal Poole --- lib/easy.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/easy.c') diff --git a/lib/easy.c b/lib/easy.c index eee1061e8..1242369d5 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -927,6 +927,8 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) Curl_convert_setup(outcurl); + Curl_initinfo(outcurl); + outcurl->magic = CURLEASY_MAGIC_NUMBER; /* we reach this point and thus we are OK */ -- cgit v1.2.3