summaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorStefan Weil2012-04-04 18:16:00 +0200
committerMichael Brown2012-04-10 14:14:15 +0200
commitede37e493d61c0cfbe04ab38bcc9819216756abf (patch)
tree2d8806d4fa85cf47f2cdcd7841ff39469705170a /src/crypto
parent[int13] Fix compilation on some versions of gcc (diff)
downloadipxe-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.c2
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 */