wireshark/tools
Peter Wu f1751ef22f checkhf: handle C++-style comments
"tools/checkhf.pl epan/dissectors/packet-umts_fp.c" gave this error:

    Complex regular subexpression recursion limit (32766) exceeded at tools/checkhf.pl line 273.

This is caused by the comment "// ... Indicator's ..." which failed to
match the single-quoted string and caused "catastrophic backtracking".
Solution to fix this case is to disallow unescaped newlines (add "\n" to
the negated character class). Additionally, add logic to remove
C++-style comments for completeness.

Tested against all epan/dissectors/packet-*.c files, the only difference
in output is this umts_fp case, the running time has not regressed.

Change-Id: I7b43e01e1580acf831c0485513135b613bb02e8b
Reported-by: Joerg Mayer
Reviewed-on: https://code.wireshark.org/review/20965
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-08 19:14:00 +00:00
..
cppcheck
dftestfiles
dftestlib Make the dfilter time tests work regardless of what time zone the tests are 2015-11-10 09:04:48 +00:00
json2pcap json2pcap support added 2017-02-25 19:11:01 +00:00
lemon lemon: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7 2017-03-05 15:14:39 +00:00
npl new_create_dissector_handle -> create_dissector_handle for plugins. 2015-12-11 03:42:52 +00:00
pidl Rename tvb_new_subset() to tvb_new_subset_length_caplen(). 2017-01-10 06:19:37 +00:00
tpg Remove Nmake build system 2016-06-15 19:21:57 +00:00
.gitattributes
Get-HardenFlags.ps1 Remove remnants of g_spawn_helper support 2016-07-05 16:11:13 +00:00
Makefile.am tools: add rpm-setup.sh. 2016-12-19 13:13:24 +00:00
SkinnyProtocolOptimized.xml [skinny]: Fix tvb struct size guard value 2017-02-22 05:39:53 +00:00
WiresharkXML.py
asn2deb Fix FSF address. 2016-08-05 20:16:51 +00:00
asn2wrs.py asn2wrs: put back parsetab.py file in ASN.1 source folder 2016-08-04 18:54:05 +00:00
checkAPIs.pl A bunch of "{Mac} OS X" -> "macOS" changes. 2017-04-05 19:16:22 +00:00
checkfiltername.pl checkfiltername: Add llc.bluetooth_pid to the whitelist 2017-02-06 12:41:53 +00:00
checkhf.pl checkhf: handle C++-style comments 2017-04-08 19:14:00 +00:00
checklicenses.py Documentation with unset license is under project's license (GPL-2+) 2016-08-23 15:02:31 +00:00
colorfilters2js.pl
commit-msg Update tools/commit-msg. 2016-12-15 19:46:37 +00:00
compare-abis.sh
compress-pngs.sh Recompress PNGs. 2016-06-30 15:41:32 +00:00
convert-proto-tree-new.awk
convert_expert_add_info_format.pl
convert_proto_tree_add_text.pl
debian-nightly-package.sh debian-nightly-package.sh: Add Wireshark license 2017-04-04 16:22:01 +00:00
debian-setup.sh codecs: Add support for G.722 and G.726 2016-12-06 17:51:47 +00:00
delete_includes.py Remove Nmake build system 2016-06-15 19:21:57 +00:00
dfilter-test.py
extract_asn1_from_spec.pl
fix-encoding-args.pl
fixhf.pl
ftsanity.py Support bitfields for FT_CHAR. 2016-09-19 04:16:39 +00:00
fuzz-test.sh Fuzz: Fix the capinfos check (again). 2017-01-23 23:24:17 +00:00
gen-bugnote Escape opening curly braces in gen-bugnote. 2017-01-04 17:52:04 +00:00
generate-bacnet-vendors.py
generate-sysdig-event.py Initial Sysdig syscall (event) support. 2015-11-10 20:59:53 +00:00
generate_authors.pl Fix out-of-tree "gen-authors" target 2016-03-28 22:13:59 +00:00
git-compare-abis.sh
git-export-release.sh
gtk.suppression tools: add a Gtk/GNOME suppression file. 2017-02-02 12:42:01 +00:00
html2text.py
idl2deb Update FSF address. 2016-08-05 20:25:12 +00:00
idl2wrs
indexcap.py
install_rpms_for_devel.sh tools: add rpm-setup.sh. 2016-12-19 13:13:24 +00:00
lex.py Ply parser updated to 3.8 from http://www.dabeaz.com/ply/ 2016-08-04 08:20:24 +00:00
licensecheck.pl checklicenses: Remove whitelisted licenses not being used 2016-08-09 02:41:30 +00:00
list_protos_in_cap.sh
macos-setup-brew.sh Make Libgcrypt a mandatory dependency 2017-02-13 18:35:47 +00:00
make-dissector-reg.py Do not update register.c's timestamp if it is unchanged, otherwise it gets recompiled 2016-10-19 08:51:27 +00:00
make-manuf make-manuf: Add more sanity checks. 2016-10-02 19:05:46 +00:00
make-pixbuf-csource.pl Make sure our shell, Perl, & Python tools are executable. 2016-03-03 20:11:25 +00:00
make-services.pl
make-services.py
make-sminmpec.pl
make-tap-reg.py
make-tls-ct-logids.py TLS: append Log name for CT Log IDs 2017-03-10 02:38:14 +00:00
make-usb.py Fixup make-usb.py 2015-07-19 20:24:08 +00:00
make_charset_table.c Use %zu, not %zd, to print a size_t value (%zd would be for ssize_t). 2015-06-06 19:20:19 +00:00
msnchat
ncp2222.py ncp: convert GHashTable to wmem_map_t. 2017-02-02 15:33:20 +00:00
netscreen2dump.py
parse_xml2skinny_dissector.py [skinny]: Fix tvb struct size guard value 2017-02-22 05:39:53 +00:00
pkt-from-core.py More spelling fixes found by lintian 2015-11-20 05:47:29 +00:00
pre-commit Update message on outdated precommit hook 2016-11-28 16:00:03 +00:00
pre-commit-ignore.conf Combine Decode As and port preferences for tcp.port dissector table. 2016-10-08 02:44:53 +00:00
pre-commit-ignore.py pre-commit: Ignore missing pre-commit-ignore.py 2016-08-18 11:00:27 +00:00
process-x11-fields.pl Support building the X11 dissector outside the source tree. 2015-11-29 11:20:39 +00:00
process-x11-xcb.pl X11: Fix last indent issue on X11 generator 2016-06-16 03:08:07 +00:00
randpkt-test.sh randpkt-test: Fix our optstring 2016-10-05 18:35:44 +00:00
rdps.py
rpm_setup.sh tools: add rpm-setup.sh. 2016-12-19 13:13:24 +00:00
runa2x.sh Make sure our shell, Perl, & Python tools are executable. 2016-03-03 20:11:25 +00:00
runlex.sh Cleanup runlex.sh to use builtin POSIX functions instead of sed 2017-02-15 20:58:43 +00:00
setuid-root.pl.in No need for execute bit on setuid-root.pl.in 2016-02-03 14:49:08 +00:00
test-captures.sh Add an initial "shellcheck" target. 2016-09-26 23:17:02 +00:00
test-common.sh A bunch of "{Mac} OS X" -> "macOS" changes. 2017-04-05 19:16:22 +00:00
textify.ps1
update-tx remove Wireshark.pro, modify update-tx accordingly 2016-06-30 05:32:29 +00:00
usb-ptp-extract-models.pl
usb-ptp-extract-models.txt
valgrind-wireshark.sh tools: add options validation. 2017-02-24 13:49:56 +00:00
validate-diameter-xml.sh Validate the Diameter XML files in the pre-commit script. 2016-11-02 04:42:47 +00:00
vg-suppressions tools: add more entries to valgrind suppression file (libc). 2017-03-05 15:12:20 +00:00
win-setup.ps1 Windows: update GnuTLS to 3.4.11 and Libgcrypt to 1.7.6 2017-02-15 17:32:36 +00:00
wireshark_be.py Spelling fixes for errors found by lintian 2015-12-07 07:11:54 +00:00
wireshark_gen.py dissectors (and tools): fix typo dependant -> dependent 2017-03-19 21:55:21 +00:00
ws-coding-style.cfg We now support C++/C99-style comments. 2016-09-06 02:44:32 +00:00
yacc.py Ply parser updated to 3.8 from http://www.dabeaz.com/ply/ 2016-08-04 08:20:24 +00:00