From 0922caa3be5df220aa3d0a0d828c21b279defad1 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 26 Aug 2019 16:08:31 -0500 Subject: [PATCH] kauth: Move COUNT_REQ to beginning of block Commit b604ee7a (OPENAFS-SA-2018-002 kaserver: prevent KAM_ListEntry information leak) added a memset in kamListEntry before COUNT_REQ, but COUNT_REQ declares a local variable. This breaks the WINNT build, because we must declare variables at the beginning of a block. To fix this, just swap the two lines. Reviewed-on: https://gerrit.openafs.org/13815 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk (cherry picked from commit b9b5385e6a04dcacd180f33e39495c7909fe4df3) Change-Id: Id9c1fd67e4614f8f433415486e107ecb4bd0d708 Reviewed-on: https://gerrit.openafs.org/13849 Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Marcio Brito Barbosa Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand --- src/kauth/kaprocs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kauth/kaprocs.c b/src/kauth/kaprocs.c index 1c6c68f97..26c1af46f 100644 --- a/src/kauth/kaprocs.c +++ b/src/kauth/kaprocs.c @@ -1700,8 +1700,8 @@ kamListEntry(struct rx_call *call, afs_int32 caller; struct kaentry tentry; - memset(name, 0, sizeof(*name)); COUNT_REQ(ListEntry); + memset(name, 0, sizeof(*name)); if ((code = InitAuthServ(&tt, LOCKREAD, this_op))) return code; code = check_auth(call, tt, 1, &caller); -- 2.39.5