summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-23 11:33:16 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-23 11:33:16 +0900
commit396df67739bed1615e92071961e3e4d2bf378c16 (patch)
treeaebed06b96b6cb69243d1eccab1c0450068f89c7 /compat
parentc77ba76807f30c2d69febbe8ad1f6b03ba4314f1 (diff)
parent467860bc0b0447093ae97bcecf1655131732338f (diff)
Merge branch 'tc/memzero-array'
MEMZERO_ARRAY() helper is introduced to avoid clearing only the first N bytes of an N-element array whose elements are larger than a byte. * tc/memzero-array: contrib/coccinelle: pass include paths to spatch(1) git-compat-util: introduce MEMZERO_ARRAY() macro
Diffstat (limited to 'compat')
-rw-r--r--compat/simple-ipc/ipc-win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/simple-ipc/ipc-win32.c b/compat/simple-ipc/ipc-win32.c
index a8fc812adf..4a3e7df9c7 100644
--- a/compat/simple-ipc/ipc-win32.c
+++ b/compat/simple-ipc/ipc-win32.c
@@ -686,7 +686,7 @@ static LPSECURITY_ATTRIBUTES get_sa(struct my_sa_data *d)
goto fail;
}
- memset(ea, 0, NR_EA * sizeof(EXPLICIT_ACCESS));
+ MEMZERO_ARRAY(ea, NR_EA);
ea[0].grfAccessPermissions = GENERIC_READ | GENERIC_WRITE;
ea[0].grfAccessMode = SET_ACCESS;