Fix ASCII key computation.
authorrbalint <rbalint@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 23 Mar 2009 18:14:28 +0000 (18:14 +0000)
committerrbalint <rbalint@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 23 Mar 2009 18:14:28 +0000 (18:14 +0000)
This fixes bug 2943 thus allows ESP decoding again, which was
broken since r25264.

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

epan/dissectors/packet-ipsec.c

index 5a10b2bca89770dc3a8352108319143f74d9e83a..182bd945335a11c6c81d6b24ea548c7745222551 100644 (file)
@@ -1176,7 +1176,7 @@ compute_ascii_key(gchar **ascii_key, gchar *key)
                      *ascii_key = NULL;
                      return -1;        /* not a valid hex digit */
                    }
-                 key_byte = ((guchar)hex_digit) << 8;
+                 key_byte = ((guchar)hex_digit) << 4;
                  hex_digit = g_ascii_xdigit_value(key[i]);
                  i++;
                  if (hex_digit == -1)
@@ -1222,7 +1222,7 @@ compute_ascii_key(gchar **ascii_key, gchar *key)
                      *ascii_key = NULL;
                      return -1;        /* not a valid hex digit */
                    }
-                 key_byte = ((guchar)hex_digit) << 8;
+                 key_byte = ((guchar)hex_digit) << 4;
                  hex_digit = g_ascii_xdigit_value(key[i]);
                  i++;
                  if (hex_digit == -1)