wireshark/epan
Dylan Ulis e4c5efafb7 CIP: Highlight correct bytes in Req/Rsp processing
Previously, dissect_cip_generic_service_req and dissect_cip_generic_service_rsp
set lengths at different levels of the packet. In some cases, this would
cause a malformed packet when the data length was zero. This fixes the
malformed error by explicitly setting the length, instead of using -1.

The length of the service data set is not the data paylod for both
cases. Previously, for requests, it attempted to highlight the whole CIP
layer, but this was already covered by the full CIP protocol layer
length.

Change-Id: I4b4a99d30b9e04872fcf7ffb127c496e6062856c
Reviewed-on: https://code.wireshark.org/review/25672
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-08 23:41:12 +00:00
..
crypt epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dfilter epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dissectors CIP: Highlight correct bytes in Req/Rsp processing 2018-02-08 23:41:12 +00:00
ftypes epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
wmem wmem: use SPDX identifiers. 2018-02-08 19:29:02 +00:00
wslua replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
.editorconfig
CMakeLists.txt cmake: add ps.c to the checkAPI list with the proper path. 2018-01-18 11:01:38 +00:00
Makefile.am
addr_and_mask.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
addr_and_mask.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
addr_resolv.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
addr_resolv.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
address.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
address_types.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
address_types.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
afn.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
afn.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
aftypes.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
aftypes.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
app_mem_usage.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
app_mem_usage.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
arcnet_pids.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
arptypes.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
asn1.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
asn1.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ax25_pids.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
bridged_pids.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
capture_dissectors.c
capture_dissectors.h
charsets.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
charsets.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
chdlctypes.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
color_filters.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
color_filters.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
column-info.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
column-utils.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
column-utils.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
column.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
column.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
conv_id.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
conversation.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
conversation.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
conversation_debug.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
conversation_table.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
conversation_table.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc6-tvb.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc6-tvb.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc8-tvb.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc8-tvb.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc10-tvb.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc10-tvb.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc16-tvb.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc16-tvb.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc32-tvb.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
crc32-tvb.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
decode_as.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
decode_as.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
diam_dict.h
diam_dict.l
disabled_protos.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
disabled_protos.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dissector_filters.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dissector_filters.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
doxygen.cfg.in
dtd.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dtd_grammar.lemon
dtd_parse.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dtd_parse.l
dtd_preparse.l
dvb_chartbl.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
dvb_chartbl.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
eap.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
eapol_keydes_types.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
epan.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
epan.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
epan_dissect.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
etypes.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ex-opt.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ex-opt.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
except.c
except.h
exceptions.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
exntest.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
expert.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
expert.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
export_object.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
export_object.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
exported_pdu.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
exported_pdu.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
filter_expressions.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
filter_expressions.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
follow.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
follow.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
frame_data.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
frame_data.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
frame_data_sequence.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
frame_data_sequence.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
funnel.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
funnel.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
garrayfix.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
geoip_db.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
geoip_db.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
golay.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
golay.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
guid-utils.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
guid-utils.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
iana_charsets.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
iana_charsets.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
iax2_codec_type.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
in_cksum.c
in_cksum.h
ip_opts.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ipproto.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ipproto.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ipv4.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ipv6.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
lapd_sapi.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
llcsaps.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
media_params.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
media_params.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
next_tvb.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
next_tvb.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
nlpid.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
oids.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
oids.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
oids_test.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
osi-utils.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
osi-utils.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
oui.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
packet.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
packet.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
packet_info.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
params.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
plugin_if.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
plugin_if.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ppptypes.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
prefs-int.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
prefs.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
prefs.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
print.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
print.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
print.ps
print_stream.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
print_stream.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
proto.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
proto.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
proto_data.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
proto_data.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ps.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
ptvcursor.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
radius_dict.l
range.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
range.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
reassemble.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
reassemble.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
reassemble_test.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
reedsolomon.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
reedsolomon.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
register.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
register.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
req_resp_hdrs.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
req_resp_hdrs.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
rtd_table.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
rtd_table.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
rtp_pt.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sctpppids.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sequence_analysis.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sequence_analysis.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
show_exception.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
show_exception.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
slow_protocol_subtypes.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
sminmpec.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
srt_table.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
srt_table.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stat_groups.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stat_tap_ui.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stat_tap_ui.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stats_tree.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stats_tree.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stats_tree_priv.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stream.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
stream.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
strutil.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
strutil.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
t35.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
t35.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tap-voip.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tap.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tap.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tfs.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tfs.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
time_fmt.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
timestamp.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
timestamp.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
timestats.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
timestats.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
to_str-int.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
to_str.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
to_str.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbparse.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbparse.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbtest.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff-int.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff_base64.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff_composite.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff_real.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff_subset.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
tvbuff_zlib.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
uat-int.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
uat.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
uat.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
uat_load.l
unit_strings.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
unit_strings.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
value_string.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
value_string.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
x264_prt_id.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
xdlc.c epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00
xdlc.h epan: use SPDX indentifiers. 2018-02-08 19:29:45 +00:00