diff options
| author | Mattias Andrée <m@maandree.se> | 2026-05-17 19:11:50 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-05-17 19:12:48 +0200 |
| commit | 70001dac8edaa045d72adbf2c1e68aea2429dc0a (patch) | |
| tree | 18a1999aa2823d507cf78a829b694c2849968e86 /test.c | |
| parent | Add __AARCH64EL__ (diff) | |
| download | libblake-70001dac8edaa045d72adbf2c1e68aea2429dc0a.tar.gz libblake-70001dac8edaa045d72adbf2c1e68aea2429dc0a.tar.bz2 libblake-70001dac8edaa045d72adbf2c1e68aea2429dc0a.tar.xz | |
Fix clang-sanitizer complaints on test code
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | test.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -667,7 +667,8 @@ hash_blake2xs(unsigned char **msg, size_t msglen, size_t *msgsize, params.depth = 1; params.xof_len = (uint_least16_t)hashlen; - memset(*out, 0xCC, *outsize); + if (*outsize) + memset(*out, 0xCC, *outsize); libblake_blake2xs_init(&state, ¶ms); *outlen = hashlen; @@ -732,7 +733,8 @@ hash_blake2xb(unsigned char **msg, size_t msglen, size_t *msgsize, params.depth = 1; params.xof_len = (uint_least32_t)hashlen; - memset(*out, 0xCC, *outsize); + if (*outsize) + memset(*out, 0xCC, *outsize); libblake_blake2xb_init(&state, ¶ms); *outlen = hashlen; |
