From: Daniel Stenberg Date: Thu, 11 May 2023 07:56:51 +0000 (+0200) Subject: headers: clear (possibly) lingering pointer in init X-Git-Tag: curl-8_1_0~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd1c611b24eed0b3eebda52d445b55c6b4a2945f;p=thirdparty%2Fcurl.git headers: clear (possibly) lingering pointer in init The "prevhead" pointer is used for the headers storage but was not cleared correctly in init, which made it possible to act up when a handle is reused. Reported-by: Steve Herrell Fixes #11101 Closes #11103 --- diff --git a/lib/headers.c b/lib/headers.c index 6cd7e31703..457ed63eda 100644 --- a/lib/headers.c +++ b/lib/headers.c @@ -336,6 +336,7 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header, static void headers_init(struct Curl_easy *data) { Curl_llist_init(&data->state.httphdrs, NULL); + data->state.prevhead = NULL; } /*