aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca
diff options
context:
space:
mode:
authorJ08nY2023-10-06 15:26:06 +0200
committerJ08nY2023-10-06 15:26:06 +0200
commit71579306e7c63123426e5bda105e3ab850fbbb20 (patch)
tree854403cca3e31606e365bf762fb00066ce95c843 /pyecsca
parent135a0ba95497e10fb3b22bef25eaff1d043b0c0b (diff)
downloadpyecsca-codegen-71579306e7c63123426e5bda105e3ab850fbbb20.tar.gz
pyecsca-codegen-71579306e7c63123426e5bda105e3ab850fbbb20.tar.zst
pyecsca-codegen-71579306e7c63123426e5bda105e3ab850fbbb20.zip
Test under -fsanitize and fix Keccak issue.
Diffstat (limited to 'pyecsca')
-rw-r--r--pyecsca/codegen/prng/KeccakP-200-compact.c4
1 files changed, 3 insertions, 1 deletions
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);
+ }
}
/* ---------------------------------------------------------------- */