Wireshark mailing list archives

[PATCH] cond_one_of return too fast.


From: Jakub Zawadzki <darkjames () darkjames ath cx>
Date: Sat, 8 May 2010 23:36:22 +0200

Hi,

I hit a bug while writting JSON dissector.

If one codition of tvbparse_set_oneof() is tvbparse_string with some big string,
and when we are dissecting end of the packet where it's no space for this condition
(offset + length_of_this_string > end_offset), cond_one_of returns -1 instead of checking
other possibilities.

It could be workarounded by sorting set_oneof() conditions from smallest one to biggest,
but attaching proper fix :)

Regards.

Attachment: return-later.patch
Description:

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: