Return sane error message if passwed in argument is NULL
authorTheodore Tso <tytso@mit.edu>
Fri, 19 Feb 1993 00:27:13 +0000 (00:27 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 19 Feb 1993 00:27:13 +0000 (00:27 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2489 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/asn.1/etpt2ketpt.c

index 2797278394c086d4d5a488c453a9af39385fb421..077d509198f18117723b2e6dd8016d040a5c22e5 100644 (file)
@@ -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;