mirror of
https://github.com/xcat2/xNBA.git
synced 2025-02-16 02:28:24 +00:00
[crypto] Fix wrong setup in function aes_wrap
Use explicit size in memset because 8 bytes must be set always. This problem was reported by cppcheck. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
3c13d68f50
commit
ede37e493d
@ -48,7 +48,7 @@ int aes_wrap ( const void *kek, const void *src, void *dest, int nblk )
|
||||
cipher_setkey ( &aes_algorithm, aes_ctx, kek, 16 );
|
||||
|
||||
/* Set up */
|
||||
memset ( A, 0xA6, sizeof ( A ) );
|
||||
memset ( A, 0xA6, 8 );
|
||||
memmove ( dest + 8, src, nblk * 8 );
|
||||
|
||||
/* Wrap */
|
||||
|
Loading…
x
Reference in New Issue
Block a user