From 71579306e7c63123426e5bda105e3ab850fbbb20 Mon Sep 17 00:00:00 2001 From: J08nY Date: Fri, 6 Oct 2023 15:26:06 +0200 Subject: Test under -fsanitize and fix Keccak issue. --- pyecsca/codegen/prng/KeccakP-200-compact.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pyecsca/codegen') diff --git a/pyecsca/codegen/prng/KeccakP-200-compact.c b/pyecsca/codegen/prng/KeccakP-200-compact.c index 42c972b..f07bae9 100644 --- a/pyecsca/codegen/prng/KeccakP-200-compact.c +++ b/pyecsca/codegen/prng/KeccakP-200-compact.c @@ -169,7 +169,9 @@ void KeccakP200_Permute_18rounds(void *argState) void KeccakP200_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned int length) { - memcpy(data, (UINT8*)state+offset, length); + if (length) { + memcpy(data, (UINT8*)state+offset, length); + } } /* ---------------------------------------------------------------- */ -- cgit v1.3.1