david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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:
Stefan Weil 2012-04-04 18:16:00 +02:00 committed by Michael Brown
parent 3c13d68f50
commit ede37e493d
1 changed files with 1 additions and 1 deletions

View File

@ -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 */