diff options
author | Michael Mann <mmann78@netscape.net> | 2017-06-14 11:44:26 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-06-15 04:15:08 +0000 |
commit | acb488b7f4c628ec0aecdb970694c6f5a97974bc (patch) | |
tree | c266197c9d97aad8708cb143f3197c570d399e5a /epan/dissectors | |
parent | 01fe854fa00e780e2eb7f9b18a11a09ff0dc1c11 (diff) |
packet-x11.c: Sanity check BIG-REQUEST length
Bug: 13793
Change-Id: I8863da14f889c68d161f4e53aa6a4e0d2636ba48
Reviewed-on: https://code.wireshark.org/review/22140
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>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-x11.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index c26588c68b..631bc9ed61 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -4919,15 +4919,15 @@ static void dissect_x11_requests(tvbuff_t *tvb, packet_info *pinfo, plen = tvb_get_guint32(tvb, offset + 4, byte_order); } - if (plen == 0) { + if (plen <= 0) { /* - * This can't be 0, as it includes the header length. + * This can't be less then 0, as it includes the header length. * A different choice of byte order wouldn't have * helped. * Give up. */ ti = proto_tree_add_item(tree, proto_x11, tvb, offset, -1, ENC_NA); - expert_add_info_format(pinfo, ti, &ei_x11_request_length, "Bogus request length (0)"); + expert_add_info_format(pinfo, ti, &ei_x11_request_length, "Bogus request length (%d)", plen); return; } |