Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] [PATCH] fix crash in packet-aim-signon.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jon Oberheide <jon@xxxxxxxxxxxxx>
Date: Sat, 10 Apr 2004 19:41:00 -0400
The attached packet dump captured while signing on to AIM using
gaim-0.76 causes ethereal (CVS) to crash with the following output:

** ERROR **: file proto.c: line 1917 (alloc_field_info): assertion
failed: ((guint)hfindex < gpa_hfinfo.len)

The problem originates when proto_tree_add_item(tree, hf_aim_infotype,
tvb, offset, 2, FALSE); is called in dissect_aim_snac_signon_signon() in
packet-aim-signon.c.

The attached patch resolves the crash.

Please CC replies to me as I'm not subscribed.

Regards,
Jon Oberheide
jon@xxxxxxxxxxxxx
--- ethereal-0.10.3.old/packet-aim-signon.c	2004-03-23 01:21:17.000000000 -0500
+++ ethereal-0.10.3.new/packet-aim-signon.c	2004-04-10 19:20:13.630422912 -0400
@@ -188,6 +188,9 @@
 
 /* Setup list of header fields */
   static hf_register_info hf[] = {
+    { &hf_aim_infotype,
+      { "Infotype", "aim.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }
+    },
     { &hf_aim_signon_challenge_len,
       { "Signon challenge length", "aim.signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }
     },

Attachment: aim-signon-crash.dump
Description: Binary data