mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
fix(crypto): Fix incorrect handling of empty input in blake256_Update().
This commit is contained in:
parent
52c34c7364
commit
b2cc3bcb36
@ -169,9 +169,8 @@ void blake256_Update( BLAKE256_CTX *S, const uint8_t *in, size_t inlen )
|
|||||||
{
|
{
|
||||||
memcpy( ( void * ) ( S->buf + left ), \
|
memcpy( ( void * ) ( S->buf + left ), \
|
||||||
( void * ) in, ( size_t ) inlen );
|
( void * ) in, ( size_t ) inlen );
|
||||||
S->buflen = left + ( int )inlen;
|
|
||||||
}
|
}
|
||||||
else S->buflen = 0;
|
S->buflen = left + inlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user