Fix 2 OOM errors: a missing NULL-check in lib/http_negociate.c
and a potential NULL dereferencing in lib/splay.c
Changelog
+- Julien Chaffraix fixed 2 OOM errors: a missing NULL-check in
+ lib/http_negociate.c and a potential NULL dereferencing in lib/splay.c
+
Daniel Stenberg (25 May 2010)
- Howard Chu brought a patch that makes the LDAP code much cleaner, nicer and
in general being a better libcurl citizen. If a new enough OpenLDAP version
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);
for (i = 0; i < MAX; i++) {
struct timeval key;
ptrs[i] = t = malloc(sizeof(struct Curl_tree));
+ if(!t) {
+ puts("out of memory!");
+ return 0;
+ }
key.tv_sec = 0;
#ifdef TEST2
#endif
t->payload = (void *)key.tv_usec; /* for simplicity */
- if(!t) {
- puts("out of memory!");
- return 0;
- }
root = Curl_splayinsert(key, root, t);
}