Fbzero: use captured_length for avoid exception when executing the heuristic check

Change-Id: I9c51032060b821f79ba2fbbc496d6ce1e20ce304
Reviewed-on: https://code.wireshark.org/review/22535
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Alexis La Goutte 2017-07-07 12:39:32 +02:00 committed by Anders Broman
parent 564519e57a
commit e411dde969

View file

@ -390,8 +390,8 @@ static gboolean dissect_fb_zero_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tr
conversation_t *conversation = NULL;
int offset = 0;
guint32 version, length, message_tag;
/* Verify packet size (Flag (1 byte) + Version (3bytes) + Flag (1 byte) + length (4 bytes) + Tag (4 bytes)*/
if (tvb_reported_length(tvb) < 13)
/* Verify packet size (Flag (1 byte) + Version (3bytes) + Flag (1 byte) + length (4 bytes) + Tag (4 bytes) */
if (tvb_captured_length(tvb) < 13)
{
return FALSE;
}