ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 3256] New dissector: gadu-gadu protocol

Date: Sun, 4 Oct 2009 14:59:26 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3256





--- Comment #21 from Bill Meier <wmeier@xxxxxxxxxxx>  2009-10-04 14:59:24 PDT ---
(In reply to comment #20)
> (In reply to comment #19) 
> > 4.  Please use tvb_reported_length_remaining rather than 
> >     tvb_length_remaining.
> >     For an explanation see:
> >     http://www.wireshark.org/lists/wireshark-dev/200807/msg00179.html
> 
> Ok, but Gadu-Gadu packets has got len field inside, so it might be better to:
>      if (tvb_reported_length_remaining(tvb, 0) != expected_len)
>           ; /* throw exception, add info about shortened packet ? */
> 
> Or maybe pass expected_len as param to subfunctions? 
> ( and don't use tvb*_length_remaining() )

Wireshark will automaticially throw an exception if a tvb_... function tries to
fetch past the end of the buffer. The message will be different depending upon
whether the reference is within the reported-length or not.

So: I think you need do nothing (other than using tvb_reported_length and you
will get the appropriate message about a short-buffer.


> 
> I was thinking to change description in gg_packets_type_recv &
> gg_packets_type_send, e.g.
> 
> from: { GG_WELCOME, "Welcome packet" },
>   to  { GG_WELCOME, "GG_WELCOME" }
> and inside COL_INFO put "Welcome packet"
> 
> It would fix "multiple identical text value_strings"
> What you think about it?
> 

A quick look suggests that this might be OK ....


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