Wireshark-bugs: [Wireshark-bugs] [Bug 4028] CIP IOI path too short in response; ASSERT sometimes
Date: Mon, 21 Sep 2009 05:17:14 -0700 (PDT)

--- Comment #3 from Julian Fielding <[email protected]>  2009-09-21 05:17:10 PDT ---
(In reply to comment #1)
> Since you seem to have a pretty good handle on it, and access to sample
> captures, could you put together a patch for this?

Two problems: 1) I don't have a development environment set up. 2) I'm not very
familiar with Wireshark code. (And yes, I realise that fixing 1 is the best way
to fix 2.)

Of course, the half size bug is easy:
-               dissect_epath( tvbIOI, pi, 0, preq_info->IOILen, TRUE );
+               dissect_epath( tvbIOI, pi, 0, preq_info->IOILen*2, TRUE );

But that doesn't explain the asserts. After more delving, I think the half size
bug usually hides another: In six places proto_tree_add_item is used with size
0 to add an FT_UINT8/16/32 item. I think it should be replaced with
- it = proto_tree_add_item( cia_tree, hf_cip_member8, NULL, 0, 0, TRUE );
+ it = proto_tree_add_uint( cia_tree, hf_cip_member8, NULL, 0, 0, temp_data );

And the same for the other five:

The attachment CIPsizes.pcap contains test cases for all except attribute32 -
my hardware won't generate that.

Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.