From e915db7cc8c779368afef51c12241337b4d7beda Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Tue, 10 Feb 2015 13:49:28 +0100 Subject: Do not iterate over reported length when using tvb_find_line_end if captured length < reported length, this will trigger an infinite loop Change-Id: I6557b455e7bbff12658a934e5bb13a42c023e133 Reviewed-on: https://code.wireshark.org/review/7053 Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann Reviewed-by: Pascal Quantin --- epan/dissectors/packet-mrcpv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/dissectors/packet-mrcpv2.c') diff --git a/epan/dissectors/packet-mrcpv2.c b/epan/dissectors/packet-mrcpv2.c index 4709455ca9..6547f60543 100644 --- a/epan/dissectors/packet-mrcpv2.c +++ b/epan/dissectors/packet-mrcpv2.c @@ -609,7 +609,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* process the rest of the header lines here */ content_length = 0; - while (next_offset < tvb_len) + while (tvb_offset_exists(tvb, next_offset)) { /* get next line */ offset = next_offset; -- cgit v1.2.3