Fix Bug 4183: "Wireshark can't decrypt WPA(2)-PSK when passphrase is 63 bytes".
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 11 Jan 2010 15:26:39 +0000 (15:26 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 11 Jan 2010 15:26:39 +0000 (15:26 +0000)
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4183

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31498 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-ieee80211.c

index 1d740591cc484c329845aa3e11c9b9c2d63d76dd..c8425d6af066f679df7a8cd55dadb59f41e1de94 100644 (file)
@@ -12311,7 +12311,7 @@ void set_airpdcap_keys(void)
 
         /* XXX - This just lops the end if the key off if it's too long.
          *       Should we handle this more gracefully? */
-        g_strlcpy(key.UserPwd.Passphrase, dk->key->str, AIRPDCAP_WPA_PASSPHRASE_MAX_LEN);
+        g_strlcpy(key.UserPwd.Passphrase, dk->key->str, AIRPDCAP_WPA_PASSPHRASE_MAX_LEN+1);
 
         key.UserPwd.SsidLen = 0;
         if(dk->ssid != NULL && dk->ssid->len <= AIRPDCAP_WPA_SSID_MAX_LEN)