aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-11-16 12:26:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-11-16 12:26:50 +0000
commit3c4b69f95dbb4f62977557317a6962eadaad9d8f (patch)
tree1a657888bc2cff01ae062c1fd6c985abf51aa8a4
parent3f01d9a043664caa17e764d53c62b2bef58027a0 (diff)
fix OOM problem reported by Jim Meyering
-rw-r--r--lib/krb4.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/krb4.c b/lib/krb4.c
index a227b2e8f..ba471f55b 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