diff options
author | Gerald Combs <gerald@wireshark.org> | 2007-06-21 20:22:56 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2007-06-21 20:22:56 +0000 |
commit | 7efcc33a1e768a82eeb5c823946f50335448cb74 (patch) | |
tree | d1bc53d0789db767459eaa5ed84bb767b918e547 /epan/crypt | |
parent | 249a747c51efab55250ab6b57f1d8bad1584522c (diff) |
In packet-ieee802.11.c, fix a serious preference bug introduced in the
last checkin. In airpcap.c, appease the toolbar code by returning a
lower-case, non-separated WEP key.
svn path=/trunk/; revision=22152
Diffstat (limited to 'epan/crypt')
-rw-r--r-- | epan/crypt/airpdcap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c index 43fe4c458f..2e24e12125 100644 --- a/epan/crypt/airpdcap.c +++ b/epan/crypt/airpdcap.c @@ -1353,13 +1353,16 @@ parse_key_string(gchar* input_string) key_ba = g_byte_array_new(); res = hex_str_to_bytes(first_nibble, key_ba, FALSE); - if (res) { + if (res && key_ba->len > 0) { /* Key is correct! It was probably an 'old style' WEP key */ /* Create the decryption_key_t structure, fill it and return it*/ dk = g_malloc(sizeof(decryption_key_t)); dk->type = AIRPDCAP_KEY_TYPE_WEP; - dk->key = g_string_new(input_string); + /* XXX - The current key handling code in the GUI requires + * no separators and lower case */ + dk->key = g_string_new(bytes_to_str(key_ba->data, key_ba->len)); + g_string_down(dk->key); dk->bits = key_ba->len * 8; dk->ssid = NULL; |