From b9b5385e6a04dcacd180f33e39495c7909fe4df3 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. Change-Id: I47eb61e6f95c2e38c619e90c8f093de325892c63 Reviewed-on: https://gerrit.openafs.org/13815 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk --- 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 ded2d96..f7c639e 100644 --- a/src/kauth/kaprocs.c +++ b/src/kauth/kaprocs.c @@ -1691,8 +1691,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); -- 1.9.4