summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-09-25 21:38:03 +0200
committerGuy Harris <guy@alum.mit.edu>2015-09-25 20:02:42 +0000
commit0d432d8f9310d66ecabb1a47332fe3f57955529c (patch)
tree91462db0531481330eb0c5edeb2c5ed5d6b3b80e /epan
parent3659b4a7e5df5ba328e4496235fa053f90fb24e2 (diff)
downloadwireshark-0d432d8f9310d66ecabb1a47332fe3f57955529c.tar.gz
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> (cherry picked from commit 44d17c784483b1647500af1bb1afab58ca3295e2) Reviewed-on: https://code.wireshark.org/review/10653
Diffstat (limited to 'epan')
-rw-r--r--epan/crypt/airpdcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c
index b6c7c43795..8c33376659 100644
--- a/epan/crypt/airpdcap.c
+++ b/epan/crypt/airpdcap.c
@@ -1228,7 +1228,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;
}