From 07db4423140044ea45a2d201fcbaa53e0bcd0222 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 19 Feb 1993 00:27:13 +0000 Subject: [PATCH] Return sane error message if passwed in argument is NULL git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2489 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/etpt2ketpt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/krb5/asn.1/etpt2ketpt.c b/src/lib/krb5/asn.1/etpt2ketpt.c index 279727839..077d50919 100644 --- a/src/lib/krb5/asn.1/etpt2ketpt.c +++ b/src/lib/krb5/asn.1/etpt2ketpt.c @@ -49,6 +49,11 @@ register int *error; register krb5_enc_tkt_part *retval; krb5_transited *temp; + if (!val) { + *error = EINVAL; + return 0; + } + retval = (krb5_enc_tkt_part *)xmalloc(sizeof(*retval)); if (!retval) { *error = ENOMEM; -- 2.26.2