aboutsummaryrefslogtreecommitdiff
path: root/lib/http_negotiate.c
diff options
context:
space:
mode:
authorJulien Chaffraix <julien.chaffraix@gmail.com>2010-05-25 06:53:48 -0700
committerDaniel Stenberg <daniel@haxx.se>2010-05-26 00:40:26 +0200
commit9e480973eb6175bcf7ddacb5c0356e3c16373253 (patch)
tree2ce436c38eb4270ed72731e5eac43203280979c0 /lib/http_negotiate.c
parent2e056353b00d0944bdb2f8e948cc40a4dc0f3dfb (diff)
OOM fixes in http_negociate.c and lib/splay.c
Fix 2 OOM errors: a missing NULL-check in lib/http_negociate.c and a potential NULL dereferencing in lib/splay.c
Diffstat (limited to 'lib/http_negotiate.c')
-rw-r--r--lib/http_negotiate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
index 956f7342b..d51d45631 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
@@ -308,6 +308,8 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
free(neg_ctx->output_token.value);
responseToken = NULL;
neg_ctx->output_token.value = malloc(spnegoTokenLength);
+ if(neg_ctx->output_token.value == NULL)
+ return CURLE_OUT_OF_MEMORY;
memcpy(neg_ctx->output_token.value, spnegoToken,spnegoTokenLength);
neg_ctx->output_token.length = spnegoTokenLength;
free(spnegoToken);