aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2015-12-20 12:23:18 +0100
committerMartin Kaiser <wireshark@kaiser.cx>2015-12-20 15:23:46 +0000
commit49d612df06d9d07ae170e98283ccb76c3bb6bfb2 (patch)
treeb988dc5a6c2c8ba1d17a21f75edc3236e730a9e5
parentdf101863731967da50586a801fb3e61870a2e03a (diff)
[AES_unwrap] initialize the output array with 0s
for cipher_len==56, some bytes of the output array are not written An alternative approach would be to add a check for cipher_len. I understand from RFC 3394 that the AES key wrap algorithm works on multiples of 64bits and has no upper limit, we couldn't easily reject 56 bytes cipher_len. Bug: 11527 Change-Id: Ie82357bbe5512de391813dd55098df7a16bda9ae Reviewed-on: https://code.wireshark.org/review/12741 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
-rw-r--r--epan/crypt/airpdcap_rijndael.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/crypt/airpdcap_rijndael.c b/epan/crypt/airpdcap_rijndael.c
index a4c26ef442..90d98d3583 100644
--- a/epan/crypt/airpdcap_rijndael.c
+++ b/epan/crypt/airpdcap_rijndael.c
@@ -53,7 +53,7 @@ AES_unwrap(UCHAR *kek, UINT16 key_len, UCHAR *cipher_text, UINT16 cipher_len)
/* Allocate buffer for the unwrapped key */
- output = (guint8 *) g_malloc(cipher_len);
+ output = (guint8 *) g_malloc0(cipher_len);
/* Initialize variables */