diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2014-05-06 17:12:13 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-05-07 05:37:40 +0000 |
commit | 343098761f88ff69b9556a073179ddcd7b33c545 (patch) | |
tree | 0518010201aecfe1aa3706e45f17035a9595b394 /tools | |
parent | 24ca06f512f575b7eb57e4c3d5183e3b4d31e37e (diff) |
Error out if someone passes the address of a pointer to a *_string to VALS() or RVALS().
Change-Id: I85021b1cba151c16bf0a2d30169cf3dec77780f5
Reviewed-on: https://code.wireshark.org/review/1540
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/checkAPIs.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index 4847408ad5..babf96d76e 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -1841,6 +1841,14 @@ sub check_hf_entries($$) print STDERR "Error: $hf uses RVALS but 'display' does not include BASE_RANGE_STRING in $filename\n"; $errorCount++; } + if ($convert =~ m/^VALS\(&.*\)/) { + print STDERR "Error: $hf is passing the address of a pointer to VALS in $filename\n"; + $errorCount++; + } + if ($convert =~ m/^RVALS\(&.*\)/) { + print STDERR "Error: $hf is passing the address of a pointer to RVALS in $filename\n"; + $errorCount++; + } ## Benign... ## if (($ft eq "FT_BOOLEAN") && ($bitmask =~ /^(0x)?0+$/) && ($display ne "BASE_NONE")) { ## print STDERR "Error: $abbrev: FT_BOOLEAN with no bitmask must use BASE_NONE for 'display' in $filename\n"; |