diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2020-05-04 22:49:12 +0100 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2020-05-06 08:35:11 +0000 |
commit | a5703f22cb723c46d5700cf3fffc8a9b40dd47d3 (patch) | |
tree | ee7bb5e4a9cb3b4410519f68aad207ce2b01356e /epan/dissectors/packet-ipdc.c | |
parent | 1d0b233f12e937f6278fc38775fca530e2be2661 (diff) |
More changes arising from PVS-Studio output.
/opt/SourceCode/wireshark/epan/dissectors/packet-ip.c 1556 err V547 Expression 'opt == (1 | 0x00)' is always true.
/opt/SourceCode/wireshark/epan/dissectors/packet-ipdc.c 739 warn V547 Expression 'payload_len < 4' is always false.
/opt/SourceCode/wireshark/ui/text_import.c 1049 err V547 Expression 'info->offset_type == OFFSET_DEC' is always true.
None of these are actual bugfixes.
Bug: 16335
Change-Id: I6d0d3bb92c70ea625fc8b559e7a2bc5ba4e29e25
Reviewed-on: https://code.wireshark.org/review/37136
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'epan/dissectors/packet-ipdc.c')
-rw-r--r-- | epan/dissectors/packet-ipdc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ipdc.c b/epan/dissectors/packet-ipdc.c index f9288f16ed..46598aba16 100644 --- a/epan/dissectors/packet-ipdc.c +++ b/epan/dissectors/packet-ipdc.c @@ -726,6 +726,7 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d gshort nr = tvb_get_guint8(tvb,0); gshort ns = tvb_get_guint8(tvb,1); guint payload_len = get_ipdc_pdu_len(pinfo,tvb,0,NULL); + /* payload_len will be at least 4 bytes... */ gshort trans_id_size; guint32 trans_id; @@ -735,10 +736,6 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d /* display IPDC protocol ID */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPDC"); - /* short frame... */ - if (payload_len < 4) - return 0; - /* clear info column and display send/receive sequence numbers */ col_append_fstr(pinfo->cinfo, COL_INFO, "r=%u s=%u ", nr, ns); |