Ethereal-dev: [Ethereal-dev] rtcp dissector bug w/ fix

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

From: "Skip Hansen" <shansen@xxxxxxxxxxxxx>
Date: Fri, 30 May 2003 11:47:39 -0700
dissect_rtcp_sdes() gets up of sync when dissecting 
RTCP_SDES_PRIV entries.  The offset ends up being advanced past 
the prefix length and prefix string twice.  Adjusting item_len by the 
size of the prefix length and string corrects the problem.  Here's a 
one line fix to packet-rtcp.c 

--- snip ---
            proto_tree_add_string( sdes_item_tree, hf_rtcp_ssrc_prefix_string, tvb, offset, prefix_len, prefix_string );
            free( prefix_string );
            offset += prefix_len;
            item_len -= prefix_len + 1; /* added line */
         }
         prefix_string = ( char * ) malloc( item_len + 1 );
         for ( counter = 0; counter < item_len; counter++ )
             prefix_string[ counter ] =
--- snip ---