Wireshark-dev: [Wireshark-dev] MEGACO patch is incorrect?
From: "Tarlovskij Eugene" <[email protected]>
Date: Mon, 19 Jun 2006 16:25:18 +0400
Recently I've posted patch for MEGACO dissector which eliminates "Invalid
offset" error in ObservedEvents descriptor. The patch simply removes equal
sign from line 2046 of packet-megaco.c.

-			if (tvb_current_offset <= tvb_previous_offset) {
+			if (tvb_current_offset < tvb_previous_offset) {


After synchronization with wireshark repository I see that the patch is
applied in the incorrect way. The source code contains "equal" sign!

            if (tvb_current_offset = tvb_previous_offset) {

So, recent repository version still incorrect, and even more incorrect than
previous. 

I send you another patch to fix this issue.

Best,
Eugene Tarlovskij
Index: packet-megaco.c
===================================================================
--- packet-megaco.c	(revision 18517)
+++ packet-megaco.c	(working copy)
@@ -2043,7 +2043,7 @@
 			if (tvb_current_offset == -1 || tvb_current_offset > tvb_observedevents_end_offset ){
 				tvb_current_offset = tvb_observedevents_end_offset;
 			}
-			if (tvb_current_offset = tvb_previous_offset) {
+			if (tvb_current_offset < tvb_previous_offset) {
 				proto_tree_add_text(megaco_observedevent_tree, tvb, 0, 0, "[ Parse error: Invalid offset ]");
 				return;
 			}