Wireshark-dev: Re: [Wireshark-dev] Malformed packets in CORBA protocol plugin
Date: Wed, 13 Dec 2006 17:14:56 +0000
Guy Harris <guy@xxxxxxxxxxxx> wrote on 12/12/2006 10:55:20:

> I'd suggest moving the start_dissecting() calls into the routines that 
> process individual procedure requests and replies, and avoid generating 
> those calls if there are no items expected.
> 

I've looked at this a bit deeper now and this looks really messy.
The decision to call start_dissecting isn't based just on the
number of parameters. It depends whether it is a request or
a reply and if it is a reply whether that returns anything or if
it is an exception. So I want to propose a different solution.

What if packet-giop.c is changed so that dissect_giop_request_1_2
changes to look like :-

  /*
   * GIOP 1.2 Request body must fall on an 8 octet alignment, taking into
   * account we are in a new tvbuff, GIOP_HEADER_SIZE octets from the
   * GIOP octet stream start.
   */

+  if (tvb_length_remaining(tvb, offset) > 0)
    set_new_alignment(&offset, GIOP_HEADER_SIZE, 8);

This stops the offset getting moved past the end of the buffer
when there is no more data.

Can anyone see any problem with this?

Regards

Andy Ling