lbmsrs: Fix bug in heuristic causing malformed packet.

Change-Id: Ib3faa627fadb56833df0f37debeab1f8f0fe2042
Reviewed-on: https://code.wireshark.org/review/37410
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Anders Broman 2020-06-09 08:53:40 +02:00 committed by Anders Broman
parent 9fd024a050
commit 439b77d032
1 changed files with 4 additions and 0 deletions

View File

@ -852,6 +852,10 @@ static gboolean check_lbmsrs_packet(tvbuff_t *tvb, guint offset)
offset += 3;
/*move the offset by the metadata length*/
offset += rsocket_metadata_len;
if (tvb_length < (offset - start_offset + 6))
{
return FALSE;
}
}