diff options
Diffstat (limited to 'pyecsca/codegen')
| -rw-r--r-- | pyecsca/codegen/prng/KeccakP-200-compact.c | 4 |
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); + } } /* ---------------------------------------------------------------- */ |
