From: Daniel Stenberg Date: Sun, 16 Nov 2008 12:26:50 +0000 (+0000) Subject: fix OOM problem reported by Jim Meyering X-Git-Tag: curl-7_19_3~177 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c4b69f95dbb4f62977557317a6962eadaad9d8f;p=thirdparty%2Fcurl.git fix OOM problem reported by Jim Meyering --- diff --git a/lib/krb4.c b/lib/krb4.c index a227b2e8f5..ba471f55b2 100644 --- a/lib/krb4.c +++ b/lib/krb4.c @@ -153,6 +153,8 @@ krb4_encode(void *app_data, const void *from, int length, int level, void **to, { struct krb4_data *d = app_data; *to = malloc(length + 31); + if(!*to) + return -1; if(level == prot_safe) /* NOTE that the void* cast is safe, krb_mk_safe/priv don't modify the * input buffer