diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-09-25 21:38:03 +0200 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-09-25 20:02:24 +0000 |
commit | 44d17c784483b1647500af1bb1afab58ca3295e2 (patch) | |
tree | 2edf98c9d2d718e9c390dbdb44680d537bf36df4 /epan/crypt | |
parent | 9f171ee584719bf7e5bfb8a580ef9941a9012357 (diff) |
airpdcap: fix WEP decryption
Using memcpy with overlapping buffers is not safe; use memmove instead
Bug: 11549
Change-Id: I8e15eb0af38d325a5e67e8748008126ac5994588
Reviewed-on: https://code.wireshark.org/review/10652
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/crypt')
-rw-r--r-- | epan/crypt/airpdcap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c index 53737a2684..14ea621ba1 100644 --- a/epan/crypt/airpdcap.c +++ b/epan/crypt/airpdcap.c @@ -1169,7 +1169,7 @@ AirPDcapWepMng( /* remove IC header */ offset = mac_header_len; *decrypt_len-=4; - memcpy(decrypt_data+offset, decrypt_data+offset+AIRPDCAP_WEP_IVLEN+AIRPDCAP_WEP_KIDLEN, *decrypt_len-offset); + memmove(decrypt_data+offset, decrypt_data+offset+AIRPDCAP_WEP_IVLEN+AIRPDCAP_WEP_KIDLEN, *decrypt_len-offset); return AIRPDCAP_RET_SUCCESS; } |