Ethereal-dev: [Ethereal-dev] patch for packet-rtcp.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: nuf si <gnippiks@xxxxxxxxx>
Date: Tue, 19 Jun 2001 23:49:12 -0400
In packet-rtcp.c, dissect_rtcp doesn't update the offset variable when 
processing some RTCP packet types. This can lead to an infinite loop 
when an RTCP_FIR or RTCP_NACK type is encountered.



--- packet-rtcp.c.orig	Tue Jun 19 20:01:07 2001
+++ packet-rtcp.c	Tue Jun 19 20:03:07 2001
@@ -760,15 +760,15 @@
 					/* Packet length in 32 bit words MINUS one, 16 bits */
 					proto_tree_add_uint( rtcp_tree, hf_rtcp_length, tvb, offset, 2, tvb_get_ntohs( tvb, offset ) );
 					offset += 2;
-					dissect_rtcp_app( tvb, offset,
+					offset = dissect_rtcp_app( tvb, offset,
 					    pinfo->fd, rtcp_tree, padding_set,
 					    packet_length - 4 );
 					break;
 				case RTCP_FIR:
-					dissect_rtcp_fir( tvb, offset, pinfo->fd, rtcp_tree );
+					offset = dissect_rtcp_fir( tvb, offset, pinfo->fd, rtcp_tree );
 					break;
 				case RTCP_NACK:
-					dissect_rtcp_nack( tvb, offset, pinfo->fd, rtcp_tree );
+					offset = dissect_rtcp_nack( tvb, offset, pinfo->fd, rtcp_tree );
 					break;
 				default:
 					/*