diff options
author | Stefan Weil | 2012-04-04 18:16:00 +0200 |
---|---|---|
committer | Michael Brown | 2012-04-10 14:14:15 +0200 |
commit | ede37e493d61c0cfbe04ab38bcc9819216756abf (patch) | |
tree | 2d8806d4fa85cf47f2cdcd7841ff39469705170a /src/crypto | |
parent | [int13] Fix compilation on some versions of gcc (diff) | |
download | ipxe-ede37e493d61c0cfbe04ab38bcc9819216756abf.tar.gz ipxe-ede37e493d61c0cfbe04ab38bcc9819216756abf.tar.xz ipxe-ede37e493d61c0cfbe04ab38bcc9819216756abf.zip |
[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>
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/aes_wrap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/aes_wrap.c b/src/crypto/aes_wrap.c index 46ef016f..f59fbf91 100644 --- a/src/crypto/aes_wrap.c +++ b/src/crypto/aes_wrap.c @@ -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 */ |