Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
stweil authored and mcb30 committed Apr 10, 2012
1 parent 3c13d68 commit ede37e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/aes_wrap.c
Expand Up @@ -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 */
Expand Down

0 comments on commit ede37e4

Please sign in to comment.