From: Theodore Tso Date: Fri, 19 Feb 1993 00:27:13 +0000 (+0000) Subject: Return sane error message if passwed in argument is NULL X-Git-Tag: krb5-1.0-beta3~340 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=07db4423140044ea45a2d201fcbaa53e0bcd0222;p=krb5.git 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 --- 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;