mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 18:11:49 +03: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:
committed by
Michael Brown
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 );
|
cipher_setkey ( &aes_algorithm, aes_ctx, kek, 16 );
|
||||||
|
|
||||||
/* Set up */
|
/* Set up */
|
||||||
memset ( A, 0xA6, sizeof ( A ) );
|
memset ( A, 0xA6, 8 );
|
||||||
memmove ( dest + 8, src, nblk * 8 );
|
memmove ( dest + 8, src, nblk * 8 );
|
||||||
|
|
||||||
/* Wrap */
|
/* Wrap */
|
||||||
|
|||||||
Reference in New Issue
Block a user