Reinitialize counter between loops to avoid an out of bound access found with fuzz testing.
svn path=/trunk/; revision=53612
This commit is contained in:
parent
5d44edf894
commit
ca8b7b1ad0
|
@ -295,7 +295,7 @@ rtpproxy_add_parameter(proto_tree *rtpproxy_tree, tvbuff_t *tvb, guint begin, gu
|
||||||
proto_tree *another_tree = NULL;
|
proto_tree *another_tree = NULL;
|
||||||
guint offset = 0;
|
guint offset = 0;
|
||||||
guint new_offset = 0;
|
guint new_offset = 0;
|
||||||
gint i = 0;
|
gint i;
|
||||||
guint pt = 0;
|
guint pt = 0;
|
||||||
gchar** codecs = NULL;
|
gchar** codecs = NULL;
|
||||||
guint codec_len;
|
guint codec_len;
|
||||||
|
@ -315,6 +315,7 @@ rtpproxy_add_parameter(proto_tree *rtpproxy_tree, tvbuff_t *tvb, guint begin, gu
|
||||||
new_offset = (gint)strspn(rawstr+offset, "0123456789,");
|
new_offset = (gint)strspn(rawstr+offset, "0123456789,");
|
||||||
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_codecs);
|
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_codecs);
|
||||||
codecs = g_strsplit(tvb_get_string(wmem_packet_scope(), tvb, begin+offset, new_offset), ",", 0);
|
codecs = g_strsplit(tvb_get_string(wmem_packet_scope(), tvb, begin+offset, new_offset), ",", 0);
|
||||||
|
i = 0;
|
||||||
while(codecs[i]){
|
while(codecs[i]){
|
||||||
/* We assume strings < 2^32-1 bytes long. :-) */
|
/* We assume strings < 2^32-1 bytes long. :-) */
|
||||||
codec_len = (guint)strlen(codecs[i]);
|
codec_len = (guint)strlen(codecs[i]);
|
||||||
|
|
Loading…
Reference in New Issue