1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Fix: Corrected a memory corruption

This commit is contained in:
Philipp Schafft 2020-10-21 16:59:21 +00:00
parent 29c5bd8d85
commit fa95e94c65

View File

@ -281,7 +281,7 @@ static inline size_t sha3_read(digest_t *digest, void *buf, size_t len)
{
const size_t block_size = digest->state.sha3.block_size;
memset(digest->state.sha3.message + digest->state.sha3.rest, 0, block_size - digest->state.sha3.rest);
memset(((char*)digest->state.sha3.message) + digest->state.sha3.rest, 0, block_size - digest->state.sha3.rest);
((char*)digest->state.sha3.message)[digest->state.sha3.rest] |= 0x06;
((char*)digest->state.sha3.message)[block_size - 1] |= 0x80;