Browse Source

[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>
tags/v1.20.1
Stefan Weil 12 years ago
parent
commit
ede37e493d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/crypto/aes_wrap.c

+ 1
- 1
src/crypto/aes_wrap.c View File

@@ -48,7 +48,7 @@ int aes_wrap ( const void *kek, const void *src, void *dest, int nblk )
48 48
 	cipher_setkey ( &aes_algorithm, aes_ctx, kek, 16 );
49 49
 
50 50
 	/* Set up */
51
-	memset ( A, 0xA6, sizeof ( A ) );
51
+	memset ( A, 0xA6, 8 );
52 52
 	memmove ( dest + 8, src, nblk * 8 );
53 53
 
54 54
 	/* Wrap */

Loading…
Cancel
Save