From 1879e1bce21918cecaee505656664be0fb6b8bce Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 1 Jan 2011 23:58:20 +0000 Subject: [PATCH] auth: Don't crash if UserList contains bogus line If the first line of the UserList was bogus (caused ParseLine to return an error), then we would attempt to free the contents of an uninitialised identity structure, and crash. Initialise the structure so this no longer happens. Change-Id: I55074a5eb616ac48d8a278db2d8389d3b0e112a6 Reviewed-on: http://gerrit.openafs.org/3607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/auth/userok.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/auth/userok.c b/src/auth/userok.c index efd488a09..a8ee672ac 100644 --- a/src/auth/userok.c +++ b/src/auth/userok.c @@ -159,6 +159,8 @@ afsconf_DeleteIdentity(struct afsconf_dir *adir, struct rx_identity *user) struct rx_identity identity; afs_int32 code; + memset(&identity, 0, sizeof(struct rx_identity)); + LOCK_GLOBAL_MUTEX; UserListFileName(adir, tbuffer, sizeof tbuffer); #ifndef AFS_NT40_ENV -- 2.39.5