diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-04-14 15:22:45 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-04-14 15:22:45 +0000 |
commit | e0c2a39ad4624f5c6ddae4ac535cdaa55dcb4ce1 (patch) | |
tree | 67941beec753c78f19feb92fb4d2767a2a5d4491 /lib/http_negotiate.c | |
parent | cda1f2be581a9e5513eea4908814c5e24a6bc389 (diff) | |
download | curl-e0c2a39ad4624f5c6ddae4ac535cdaa55dcb4ce1.tar.gz |
- Andre Guibert de Bruet fixed a second case of not checking the malloc()
return code in the Negotiate code.
Diffstat (limited to 'lib/http_negotiate.c')
-rw-r--r-- | lib/http_negotiate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c index ac8ad5802..e7f934824 100644 --- a/lib/http_negotiate.c +++ b/lib/http_negotiate.c @@ -211,8 +211,10 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, } else { free(input_token.value); - input_token.value = NULL; input_token.value = malloc(mechTokenLength); + if (input_token.value == NULL) + return CURLE_OUT_OF_MEMORY; + memcpy(input_token.value, mechToken,mechTokenLength); input_token.length = mechTokenLength; free(mechToken); |