mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 08:38:49 -05:00
ntlm: free target_info before (re-)malloc
OSS-Fuzz found a way this could get called again with the pointer still pointing to a malloc'ed memory, leading to a leak. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24379 Closes #5724
This commit is contained in:
parent
730dc48253
commit
376d5bb323
@ -191,6 +191,7 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
|
||||
return CURLE_BAD_CONTENT_ENCODING;
|
||||
}
|
||||
|
||||
free(ntlm->target_info); /* replace any previous data */
|
||||
ntlm->target_info = malloc(target_info_len);
|
||||
if(!ntlm->target_info)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
Loading…
Reference in New Issue
Block a user