diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2015-06-25 11:59:51 -0700 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2015-06-25 19:03:22 +0000 |
commit | 8a89ebbf40b5931fc2a8afd6ed6f5bf166354687 (patch) | |
tree | dd4f5850fcee3f3eea74a80f01b9c665dd088aa7 /epan/dissectors/packet-cigi.c | |
parent | 419f67209d0e7d840124f1df31a153a36436f809 (diff) |
cigi: if the packet is not cigi, just return
don't THROW() an exception
Change-Id: Ie0ddd8caf1963ab0ab7e8bb47a275ce887e19d60
Reviewed-on: https://code.wireshark.org/review/9145
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-cigi.c')
-rw-r--r-- | epan/dissectors/packet-cigi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-cigi.c b/epan/dissectors/packet-cigi.c index 5a1d6bf0e3..7a84ec7cdb 100644 --- a/epan/dissectors/packet-cigi.c +++ b/epan/dissectors/packet-cigi.c @@ -2716,12 +2716,10 @@ cigi_add_tree(tvbuff_t *tvb, proto_tree *cigi_tree) packet_size = tvb_get_guint8(tvb, offset + 1); data_size = packet_size; - /* if the second byte of the packet carries a value that is less than - * then we know we have a malformed packet because every cigi packet - * at minimal must be a least 2 bytes ( 1 - packet_id; 2 - packet_size ). */ - if ( packet_size < 2 ) { - THROW(ReportedBoundsError); - } + /* a cigi packet must be at least 2 bytes long + ( 1 - packet_id; 2 - packet_size ) */ + if ( packet_size < 2 ) + return; /* If we have the start of frame or IG Control packet set the version. * Since we have no cigi version we assume that packet id 1 is the |