From 7b9e92de0dba2bdedc861fd19cacf08a3805461c Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 21 Jul 2008 20:56:28 +0000 Subject: [PATCH] Check for null name to krb5_cc_resolve, and return an error git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20560 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ccbase.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/ccache/ccbase.c b/src/lib/krb5/ccache/ccbase.c index e41573adf..2e33dc858 100644 --- a/src/lib/krb5/ccache/ccbase.c +++ b/src/lib/krb5/ccache/ccbase.c @@ -1,7 +1,7 @@ /* * lib/krb5/ccache/ccbase.c * - * Copyright 1990,2004 by the Massachusetts Institute of Technology. + * Copyright 1990,2004,2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -184,6 +184,8 @@ krb5_cc_resolve (krb5_context context, const char *name, krb5_ccache *cache) krb5_error_code err; const krb5_cc_ops *ops; + if (name == NULL) + return KRB5_CC_BADNAME; pfx = NULL; cp = strchr (name, ':'); if (!cp) { -- 2.26.2