Add safety check to get_credentials
authorTheodore Tso <tytso@mit.edu>
Mon, 17 Jan 1994 23:03:42 +0000 (23:03 +0000)
committerTheodore Tso <tytso@mit.edu>
Mon, 17 Jan 1994 23:03:42 +0000 (23:03 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3362 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/get_creds.c

index ac4bcf112ea33d3bd23ae1b2ecab9881b1606fcd..5126b06ce675f678895963a0fad78a8b7f440c80 100644 (file)
@@ -59,6 +59,9 @@ krb5_creds *creds;
     krb5_creds mcreds;
     krb5_flags fields;
 
+    if (!creds || !creds->server || !creds->client)
+           return -EINVAL;
+
     memset((char *)&mcreds, 0, sizeof(mcreds));
     mcreds.server = creds->server;
     mcreds.client = creds->client;