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:
parent
29c5bd8d85
commit
fa95e94c65
@ -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;
|
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)[digest->state.sha3.rest] |= 0x06;
|
||||||
((char*)digest->state.sha3.message)[block_size - 1] |= 0x80;
|
((char*)digest->state.sha3.message)[block_size - 1] |= 0x80;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user