aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-06-06 19:29:21 +0200
committerGuy Harris <guy@alum.mit.edu>2015-12-21 12:31:39 +0000
commit6730ced6d61200fbeaaa602fc5b2adda4c368741 (patch)
tree33c2644c6f5612355fabb7154a5aec94bdcadacd
parentf96b21517df06bb2de9793135f11628363cab24e (diff)
downloadwireshark-6730ced6d61200fbeaaa602fc5b2adda4c368741.tar.gz
wireshark-6730ced6d61200fbeaaa602fc5b2adda4c368741.tar.bz2
wireshark-6730ced6d61200fbeaaa602fc5b2adda4c368741.zip
airpdcap: fix V512 warning reported by PVS-Studio
A call of the 'memcpy' function will lead to the '& tmp_key' buffer becoming out of range. Change-Id: I615a6c3e0dab8cfc2d240b6b39cff387e0689f35 Reviewed-on: https://code.wireshark.org/review/8796 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> (cherry picked from commit 99d56fb0f883b07662490644a9459d4ab75baf31) Reviewed-on: https://code.wireshark.org/review/12790 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-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 df90438ad3..82f761dc45 100644
--- a/epan/crypt/airpdcap.c
+++ b/epan/crypt/airpdcap.c
@@ -1309,7 +1309,7 @@ AirPDcapRsna4WHandshake(
sa->key=tmp_key;
if (key!=NULL) {
- memcpy(key, &tmp_key, sizeof(AIRPDCAP_KEY_ITEM));
+ memcpy(key, tmp_key, sizeof(AIRPDCAP_KEY_ITEM));
if (AIRPDCAP_EAP_KEY_DESCR_VER(data[offset+1])==AIRPDCAP_WPA_KEY_VER_NOT_CCMP)
key->KeyType=AIRPDCAP_KEY_TYPE_TKIP;
else if (AIRPDCAP_EAP_KEY_DESCR_VER(data[offset+1])==AIRPDCAP_WPA_KEY_VER_AES_CCMP)