From 39bff1f90b9bdae02986fad10bd44384447bece9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 18 Oct 2018 11:26:44 +0200 Subject: [PATCH] libcli:smb: Avoid explicit ZERO_STRUCT Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- libcli/smb/smb2_signing.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c index 90d80cc9ba0..614a2b32dc0 100644 --- a/libcli/smb/smb2_signing.c +++ b/libcli/smb/smb2_signing.c @@ -65,9 +65,8 @@ NTSTATUS smb2_signing_sign_pdu(DATA_BLOB signing_key, if (protocol >= PROTOCOL_SMB2_24) { struct aes_cmac_128_context ctx; - uint8_t key[AES_BLOCK_SIZE]; + uint8_t key[AES_BLOCK_SIZE] = {0}; - ZERO_STRUCT(key); memcpy(key, signing_key.data, MIN(signing_key.length, 16)); aes_cmac_128_init(&ctx, key); @@ -137,9 +136,8 @@ NTSTATUS smb2_signing_check_pdu(DATA_BLOB signing_key, if (protocol >= PROTOCOL_SMB2_24) { struct aes_cmac_128_context ctx; - uint8_t key[AES_BLOCK_SIZE]; + uint8_t key[AES_BLOCK_SIZE] = {0}; - ZERO_STRUCT(key); memcpy(key, signing_key.data, MIN(signing_key.length, 16)); aes_cmac_128_init(&ctx, key);