From 50a993385673ed083145f587c16d0c9dd444262e Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 19 Feb 2013 15:25:12 +0000 Subject: [PATCH] kauth: realm can't be NULL when calling CellToRealm Despite what the static analyzer thinks, ka_CellToRealm can't be called with a NULL realm. Just add an assert to close down that code path, and stop it from producing an error. Change-Id: Ifc8cf7e5dca5ae29eaaa91c5b238a97197d89ee3 Reviewed-on: http://gerrit.openafs.org/9174 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/kauth/kalocalcell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kauth/kalocalcell.c b/src/kauth/kalocalcell.c index c152db7c3..9d03b3ac7 100644 --- a/src/kauth/kalocalcell.c +++ b/src/kauth/kalocalcell.c @@ -131,6 +131,8 @@ ka_CellToRealm(char *cell, char *realm, int *local) { int code = 0; + opr_Assert(realm != NULL); + LOCK_GLOBAL_MUTEX; code = ka_ExpandCell(cell, realm, local); ucstring(realm, realm, MAXKTCREALMLEN); -- 2.39.5