forked from osmocom/wireshark
[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>
This commit is contained in:
parent
df10186373
commit
49d612df06
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in New Issue