wireshark/epan
Guy Harris 1bea950b7a Add bounds checks for references to outhdr_values.
Don't run past the end of the outhdr_values array.

While we're at it, don't make it a global array - it doesn't need to be
global, as its values don't persist from invocation to invocation, and
this would allow use of this routine in multiple threads in parallel.
(Yes, we have other global variables that don't maintain state, but we
should get rid of that, too.)

Change-Id: I7ceed3c9ba6356eddb7d52472e9d53dd08f90029
Reviewed-on: https://code.wireshark.org/review/20770
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-28 23:14:20 +00:00
..
compress
crypt Fix compilation with old libcrypt versions. 2017-03-03 02:46:23 +00:00
dfilter dfilter-macro: add cleanup routine. 2017-02-03 02:38:20 +00:00
dissectors Add bounds checks for references to outhdr_values. 2017-03-28 23:14:20 +00:00
ftypes ftypes: move get_value_ptr into the union 2017-03-20 17:01:10 +00:00
wmem wmem: Ensure callbacks are initialized and not accidentally unregistered 2017-03-05 09:05:10 +00:00
wslua wslua: update a comment 2017-03-27 14:28:05 +00:00
.editorconfig
CMakeLists.txt Rename packet-range.[ch] to packet_range.[ch] 2016-12-16 17:28:50 +00:00
Makefile.am Use -bbigtoc for libwireshark on AIX (if we're using GCC or Clang). 2016-12-20 05:30:22 +00:00
addr_and_mask.c
addr_and_mask.h
addr_resolv.c Check profile directory before personal directory for services and subnets file 2017-03-03 23:45:36 +00:00
addr_resolv.h Resolv: various code / comment cleanups 2016-11-16 05:15:52 +00:00
address.h
address_types.c Properly end address type search by name (CID-1362742) 2016-08-26 16:49:57 +00:00
address_types.h
afn.c afn(.c): fix indent (align field) 2017-03-12 10:11:00 +00:00
afn.h afn(.h) fix indent 2017-03-12 10:11:28 +00:00
aftypes.c
aftypes.h
app_mem_usage.c
app_mem_usage.h
arcnet_pids.h
arptypes.h Netlink: update some values used in netlink 2017-03-22 09:51:23 +00:00
asm_utils.c
asm_utils.h
asm_utils_win32_x86.asm
asn1.c
asn1.h
ax25_pids.h
bridged_pids.h
capture_dissectors.c Implement registration of capture dissectors by name 2016-10-28 17:39:04 +00:00
capture_dissectors.h Implement registration of capture dissectors by name 2016-10-28 17:39:04 +00:00
charsets.c Rename non-EBCDIC-specific routines. 2016-12-12 08:20:22 +00:00
charsets.h Rename non-EBCDIC-specific routines. 2016-12-12 08:20:22 +00:00
chdlctypes.h
circuit.c
circuit.h
color_filters.c Color filters: Initialize a variable. 2016-10-04 16:11:14 +00:00
color_filters.h
column-info.h
column-utils.c Localize decimal point on time formatted columns. 2017-03-22 04:59:39 +00:00
column-utils.h
column.c Fix lintian found spelling error "occurence" -> "occurrence" 2016-11-03 02:31:20 +00:00
column.h
conv_id.h
conversation.c Convert conversation hash tables to use wmem. 2017-02-10 13:26:14 +00:00
conversation.h Convert conversation hash tables to use wmem. 2017-02-10 13:26:14 +00:00
conversation_debug.h
conversation_table.c Switch conversations to use wmem_tree_t instead of (sorted) GSList. 2017-03-06 11:41:54 +00:00
conversation_table.h Switch conversations to use wmem_tree_t instead of (sorted) GSList. 2017-03-06 11:41:54 +00:00
crc6-tvb.c
crc6-tvb.h
crc8-tvb.c
crc8-tvb.h
crc10-tvb.c
crc10-tvb.h
crc16-tvb.c
crc16-tvb.h
crc32-tvb.c
crc32-tvb.h
decode_as.c decode_as: Initialize decode_as_list after free 2017-01-28 11:53:06 +00:00
decode_as.h Combine Decode As and port preferences for tcp.port dissector table. 2016-10-08 02:44:53 +00:00
diam_dict.h
diam_dict.l Include config.h at the very beginning of all Flex scanners. 2016-12-02 21:02:10 +00:00
disabled_protos.c disabled_protos: add cleanup function. 2017-01-20 08:49:00 +00:00
disabled_protos.h disabled_protos: add cleanup function. 2017-01-20 08:49:00 +00:00
dissector_filters.c dissector_filters: add cleanup function. 2017-01-21 00:26:50 +00:00
dissector_filters.h dissector_filters: add cleanup function. 2017-01-21 00:26:50 +00:00
doxygen.cfg.in
dtd.h dtd: free memory on shutdown. 2017-02-24 15:43:32 +00:00
dtd_grammar.lemon
dtd_parse.h
dtd_parse.l Include config.h at the very beginning of all Flex scanners. 2016-12-02 21:02:10 +00:00
dtd_preparse.l dtd: fix build due to -Wtypedef-redefinition 2017-02-24 19:22:08 +00:00
dvb_chartbl.c
dvb_chartbl.h
dwarf.c
dwarf.h
eap.h
eapol_keydes_types.h
enterprise-numbers [Automatic update for 2017-03-26] 2017-03-26 15:13:47 +00:00
epan-int.h Make the capture file's interface description filterable 2017-02-09 11:31:59 +00:00
epan.c Switch conversations to use wmem_tree_t instead of (sorted) GSList. 2017-03-06 11:41:54 +00:00
epan.h Convert conversation hash tables to use wmem. 2017-02-10 13:26:14 +00:00
epan_dissect.h
etypes.h Identify Ethertype 0x892B (Schweitzer Engineering Labs layer 2 traffic). 2017-01-20 20:01:13 +00:00
ex-opt.c
ex-opt.h
except.c
except.h
exceptions.h
exntest.c
expert.c uat: add a reset callback. 2017-01-12 12:39:15 +00:00
expert.h
export_object.c Don't duplicate memory for key values when passing into wmem_tree_insert_string. 2017-02-09 00:19:36 +00:00
export_object.h Switch export objects to use wmem_tree_t instead of (sorted) GSList. 2017-02-08 14:24:28 +00:00
exported_pdu.c exported_pdu: add cleanup function. 2017-01-17 03:26:04 +00:00
exported_pdu.h exported_pdu: add cleanup function. 2017-01-17 03:26:04 +00:00
filter_expressions.c
filter_expressions.h
follow.c Add follow "types" by protocol short name, not filter name 2017-02-16 07:53:49 +00:00
follow.h Switch follow (tables) to use wmem_tree_t instead of (sorted) GSList. 2017-02-08 14:24:54 +00:00
frame_data.c
frame_data.h
frame_data_sequence.c Fix the calculation of the number of levels in the radix tree. 2017-03-04 04:35:42 +00:00
frame_data_sequence.h
funnel.c
funnel.h
garrayfix.h
geoip_db.c geoip_db: replace g_free with free. 2017-02-22 23:20:15 +00:00
geoip_db.h
golay.c
golay.h
guid-utils.c
guid-utils.h
iana_charsets.c
iana_charsets.h
iax2_codec_type.h
in_cksum.c Bump GLib minimum required version to 2.22.0 2016-08-04 16:13:41 +00:00
in_cksum.h
ip_opts.h Make IP options into a dissector table. 2017-02-23 03:34:30 +00:00
ipproto.c
ipproto.h
ipv4.c
ipv4.h
ipv6.h
lapd_sapi.h
llcsaps.h
media_params.c See if *this* convinces the compiler that valuelen and value will be set. 2016-08-23 03:36:55 +00:00
media_params.h Handle quoted-pairs in quoted-strings correctly. 2016-08-23 00:53:46 +00:00
next_tvb.c
next_tvb.h
nlpid.h
oids.c oids: fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7 2017-03-11 17:29:24 +00:00
oids.h
oids_test.c
osi-utils.c
osi-utils.h
oui.c Update some Cisco URLs. 2017-03-23 04:13:23 +00:00
oui.h Update some Cisco URLs. 2017-03-23 04:13:23 +00:00
packet.c Convert conversation hash tables to use wmem. 2017-02-10 13:26:14 +00:00
packet.h Snort: add a preference to show alert in reassembled frame 2017-01-28 03:53:09 +00:00
packet_info.h
packet_range.c Convert range API to always use wmem memory. 2017-01-07 00:44:10 +00:00
packet_range.h Rename packet-range.[ch] to packet_range.[ch] 2016-12-16 17:28:50 +00:00
params.h
plugin_if.c pluginIF: Allow en-/disable of elements 2017-03-04 00:56:51 +00:00
plugin_if.h pluginIF: Allow en-/disable of elements 2017-03-04 00:56:51 +00:00
ppptypes.h
prefs-int.h Internalize struct preference 2017-01-22 10:43:57 +00:00
prefs.c Qt: Disable pane menu items if not used in layout 2017-02-16 20:53:22 +00:00
prefs.h Qt: Disable pane menu items if not used in layout 2017-02-16 20:53:22 +00:00
print.c json2pcap support added 2017-02-25 19:11:01 +00:00
print.h print(.h): fix commas at the end of enumerator lists are a C++11 extension [-Wc++11-extensions] 2017-02-20 18:29:44 +00:00
print.ps
print_stream.c print_stream: free memory on exit. 2017-02-27 13:25:26 +00:00
print_stream.h
proto.c Fix up time encodings. 2017-03-28 10:18:36 +00:00
proto.h Fix up time encodings. 2017-03-28 10:18:36 +00:00
proto_data.c p_XXX_proto_data: only allow the use of pinfo and file scopes 2016-09-17 15:46:36 +00:00
proto_data.h p_XXX_proto_data: only allow the use of pinfo and file scopes 2016-09-17 15:46:36 +00:00
ps.h
ptvcursor.h
radius_dict.l radius: remove unused rule, add clarifying comment 2017-03-01 02:02:24 +00:00
range.c Convert range API to always use wmem memory. 2017-01-07 00:44:10 +00:00
range.h Convert range API to always use wmem memory. 2017-01-07 00:44:10 +00:00
reassemble.c Use g_list_prepend, it's more efficient. 2017-01-29 22:52:44 +00:00
reassemble.h Clean up indentation. 2017-01-30 01:17:21 +00:00
reassemble_test.c Fragmentation reassembly as in PPP MP (RFC 1990/2686) 2016-11-03 05:08:07 +00:00
reedsolomon.c Cleanup some checkAPI warnings that were missed in previous patches. 2016-07-26 17:15:38 +00:00
reedsolomon.h
req_resp_hdrs.c
req_resp_hdrs.h
rtd_table.c Don't duplicate memory for key values when passing into wmem_tree_insert_string. 2017-02-09 00:19:36 +00:00
rtd_table.h Switch rtd and srt tables to use wmem_tree_t instead of (sorted) GSList. 2017-02-08 14:24:42 +00:00
rtp_pt.h
sctpppids.h
show_exception.c Internalize struct preference 2017-01-22 10:43:57 +00:00
show_exception.h
slow_protocol_subtypes.h
sminmpec.c [Automatic update for 2017-03-26] 2017-03-26 15:13:47 +00:00
sminmpec.h Add define for vendor dacom 2016-09-20 11:46:21 +00:00
srt_table.c Don't duplicate memory for key values when passing into wmem_tree_insert_string. 2017-02-09 00:19:36 +00:00
srt_table.h Switch rtd and srt tables to use wmem_tree_t instead of (sorted) GSList. 2017-02-08 14:24:42 +00:00
stat_groups.h
stat_tap_ui.c stat_tap_ui: skip duplicate keys. 2017-02-19 22:45:22 +00:00
stat_tap_ui.h Switch stat tap to use wmem_tree_t instead of (sorted) GSList. 2017-02-08 14:25:07 +00:00
stats_tree.c stats_tree: fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7 2017-03-11 17:28:58 +00:00
stats_tree.h stats_tree: add cleanup function. 2017-02-07 15:28:15 +00:00
stats_tree_priv.h
stream.c stream: clean up reassembly table. 2017-02-03 02:38:07 +00:00
stream.h
strutil.c Add wmem allocator parameter to format_uri 2017-01-31 17:08:54 +00:00
strutil.h Add wmem allocator parameter to format_uri 2017-01-31 17:08:54 +00:00
t35.c
t35.h
tap-voip.h
tap.c Use glib-compat 2017-03-02 15:20:05 +00:00
tap.h tap: add cleanup routine. 2017-02-04 13:25:14 +00:00
tfs.c
tfs.h
time_fmt.h
timestamp.c
timestamp.h
timestats.c
timestats.h
to_str-int.h
to_str.c Fix backwards #if defined. 2017-01-01 05:46:37 +00:00
to_str.h Improve support for single-character fields and filter expressions. 2016-09-19 02:51:13 +00:00
tpg.c
tpg.h Rename tvb_new_subset() to tvb_new_subset_length_caplen(). 2017-01-10 06:19:37 +00:00
tvbparse.c tvbparse: fix memleak 2016-08-28 22:07:22 +00:00
tvbparse.h
tvbtest.c Rename tvb_new_subset() to tvb_new_subset_length_caplen(). 2017-01-10 06:19:37 +00:00
tvbuff-int.h
tvbuff.c format_text_wmem -> format_text 2017-01-31 17:08:47 +00:00
tvbuff.h Have tvb_format_text use wmem_packet_scope() memory. 2017-01-31 06:34:40 +00:00
tvbuff_base64.c
tvbuff_composite.c tvbuff_composite.c: fix composite_get_ptr when length is over 2 segments 2016-11-13 22:30:57 +00:00
tvbuff_real.c
tvbuff_subset.c Rename tvb_new_subset() to tvb_new_subset_length_caplen(). 2017-01-10 06:19:37 +00:00
tvbuff_zlib.c tvbuff_zlib: Check if the given offset and compressed length are indeed valid before trying to allocate memory 2016-10-05 03:28:31 +00:00
uat-int.h uat: add a reset callback. 2017-01-12 12:39:15 +00:00
uat.c Yell at the user less. 2017-02-20 16:53:17 +00:00
uat.h uat: add missing parameter to documentation. 2017-02-12 17:00:51 +00:00
uat_load.l Include config.h at the very beginning of all Flex scanners. 2016-12-02 21:02:10 +00:00
unit_strings.c Use dissector tables for PPP protocols' options. 2017-01-19 04:32:49 +00:00
unit_strings.h Use dissector tables for PPP protocols' options. 2017-01-19 04:32:49 +00:00
value_string.c Fix buffer overrun in try_bytesprefix_to_str 2017-03-13 21:46:38 +00:00
value_string.h Fix buffer overrun in try_bytesprefix_to_str 2017-03-13 21:46:38 +00:00
x264_prt_id.h
xdlc.c
xdlc.h