wireshark/tools
Peter Wu 353ad11974 checkAPIs.pl: check for return/goto in TRY/CATCH blocks
As documented in epan/exceptions.h, return/goto should never be used in
a TRY/CATCH/FINALLY block as ENDTRY must be executed first. Additionally
clamp the exit code since values larger than 255 will wrap around. Use a
small value as shells typically use 128+signal for termination signals.

Verified against packet-t125.c and ftype-protocol.c while they suffered
from the return bug. Tested against packet-gssapi.c for lack of false
positives (goto with labels within the function) and against:

    int main() {
        TRY {
            goto bar;
            goto omg;
            goto bar;
            goto barrie;
    barrie: ;
        } ENDTRY;
    bar: meh;
    }

Change-Id: I44484add34e238e07a84fc2c74b69f50ba6dc3f3
Ping-Bug: 15189
Reviewed-on: https://code.wireshark.org/review/30097
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-10 04:07:20 +00:00
..
cppcheck Tweak cppcheck to test with better settings 2018-06-06 05:20:43 +00:00
json2pcap More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
lemon lemon: Make it build with __clang_analyzer__ defined 2018-06-07 03:58:04 +00:00
npl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
oss-fuzzshark epan: Add argument to epan_init() to disable plugins 2018-09-09 02:27:34 +00:00
pidl spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
Get-HardenFlags.ps1 More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
SkinnyProtocolOptimized.xml skinny: remove comment that matches field label (callState) 2018-09-20 22:59:31 +00:00
WiresharkXML.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
asn2deb Remove autotools build system. 2018-04-18 03:46:17 +00:00
asn2wrs.py Fix WITHOUT_VALS. 2018-09-12 02:07:27 +00:00
bsd-setup.sh Use the standard test/[ command. 2018-08-21 19:21:34 +00:00
checkAPIs.pl checkAPIs.pl: check for return/goto in TRY/CATCH blocks 2018-10-10 04:07:20 +00:00
checkfiltername.pl F5ETHTRAILER: Initial cleanup from submission 2018-03-11 15:08:16 +00:00
checkhf.pl checkhf.pl: speed up find_remove_ei_defs and remove_if0_code 2018-09-24 17:54:52 +00:00
checklicenses.py CMake: Don't bother testing for _fseeki64 on Windows. 2018-07-20 19:20:11 +00:00
colorfilters2js.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
commit-msg commit-msg: fixup whitespace and blank lines around "Bug" tags 2018-08-01 14:00:48 +00:00
compare-abis.sh Get rid of more .libs stuff. 2018-04-25 04:24:21 +00:00
compress-pngs.sh More shellcheck checks and fixes. 2018-06-07 18:11:12 +00:00
convert-proto-tree-new.awk Remove $Id$ and other Subversion leftovers from the tools. 2014-02-14 01:35:57 +00:00
convert_expert_add_info_format.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
convert_proto_tree_add_text.pl Add new encoding names for seconds/{micro,nano}second time stamps. 2018-07-02 04:09:21 +00:00
debian-nightly-package.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
debian-setup.sh debian: add libsystemd-journal-dev as alternative. 2018-10-03 16:39:58 +00:00
delete_includes.py Rename packet-ssl* to packet-tls* 2018-09-25 13:24:17 +00:00
extract_asn1_from_spec.pl extract_asn1_from_spec.pl: fix parsing of END tag 2018-04-04 17:52:47 +00:00
fix-encoding-args.pl fix-encoding-args.pl: fix terrible performance with large files 2018-09-22 15:44:20 +00:00
fixhf.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
fuzz-test.sh Fuzz: Reduce the Valgrind packet limit to 10,000. 2018-08-21 15:06:48 +00:00
gen-bugnote Tools: Remove parentheses around bug notes. 2018-07-17 19:09:56 +00:00
generate-bacnet-vendors.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
generate-nl80211-fields.py nl80211: Dissect further attributes 2018-09-03 07:17:10 +00:00
generate-sysdig-event.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
generate_authors.pl Docs: AUTHORS formatting updates. 2018-08-18 21:44:00 +00:00
git-compare-abis.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
git-export-release.sh More shellcheck checks and fixes. 2018-06-07 18:11:12 +00:00
html2text.py html2txt.py: replaced 2 occurences of '{}' with equal '{0}' because of CentOS 6.x+Python2.6.6 issues 2018-05-12 19:54:05 +00:00
idl2deb Remove autotools build system. 2018-04-18 03:46:17 +00:00
idl2wrs Remove $Id$ and other Subversion leftovers from the tools. 2014-02-14 01:35:57 +00:00
indexcap.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
lex.py spdx: more licenses converted. 2018-03-09 04:48:20 +00:00
licensecheck.pl licensecheck: handle multiple licenses. 2018-03-09 11:50:15 +00:00
list_protos_in_cap.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
macos-setup-brew.sh tools: add missing packages to osx setup. 2018-05-13 20:04:50 +00:00
macos-setup.sh tools: add libjson-glib to macos-setup. 2018-09-24 04:18:42 +00:00
make-manuf.py make-manuf.py: Add response headers. 2018-09-19 00:34:50 +00:00
make-plugin-reg.py plugins: Minor interface improvement 2018-08-21 19:56:12 +00:00
make-regs.py Rewrite make-{dissectors,taps} in Python 2018-06-11 17:01:05 +00:00
make-services.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
make-sminmpec.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
make-tls-ct-logids.py Rename packet-ssl* to packet-tls* 2018-09-25 13:24:17 +00:00
make-usb.py caputils/tools: more SPDX convertions. 2018-02-09 15:20:05 +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 spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
msvc2015AdminDeployment.xml WSDG: Improve VS2015 chocolatey install 2017-11-17 12:56:52 +00:00
ncp2222.py spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
netscreen2dump.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
parse_xml2skinny_dissector.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
pkt-from-core.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
pre-commit More shellcheck fixes. 2018-06-11 16:35:08 +00:00
pre-commit-ignore.conf Lua: Switch from disable_lua to enable_lua. 2018-07-20 06:42:38 +00:00
pre-commit-ignore.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
process-x11-fields.pl Remove popcount in favor of ws_count_ones. 2018-03-13 17:18:01 +00:00
process-x11-xcb.pl Remove popcount in favor of ws_count_ones. 2018-03-13 17:18:01 +00:00
randpkt-test.sh More shellcheck checks and fixes. 2018-06-07 18:11:12 +00:00
rdps.py more SPDX convertions. 2018-02-13 13:57:30 +00:00
release-update-debian-soversions.sh CMake: Get rid of FULL_SO_VERSION 2018-06-07 04:01:37 +00:00
rpm-setup.sh Tools: Add systemd-devel to rpm-setup.sh. 2018-10-03 19:33:38 +00:00
test-captures.sh More shellcheck checks and fixes. 2018-06-07 18:11:12 +00:00
test-common.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
textify.ps1 Force textify.ps1 to read files as UTF-8. 2018-05-02 04:06:30 +00:00
update-tools-help.py Update tools help using a script. 2018-09-05 15:28:43 +00:00
update-tx update-tx: Fix our file list. 2018-09-18 22:00:01 +00:00
usb-ptp-extract-models.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
usb-ptp-extract-models.txt
valgrind-wireshark.sh More shellcheck checks and fixes. 2018-06-07 18:11:12 +00:00
validate-diameter-xml.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
vg-suppressions vg-suppressions: suppress more GLib-related memleaks 2018-04-24 21:12:49 +00:00
win-setup.ps1 Windows: upgrade USBPcap to 1.2.0.4 2018-08-16 06:26:33 +00:00
wireshark_be.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
wireshark_gen.py spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
ws-coding-style.cfg We now support C++/C99-style comments. 2016-09-06 02:44:32 +00:00
yacc.py spdx: more licenses converted. 2018-03-09 04:48:20 +00:00