aboutsummaryrefslogtreecommitdiff
path: root/lib/checksrc.pl
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2016-06-05 21:07:03 -0400
committerJay Satiro <raysatiro@yahoo.com>2016-06-05 21:07:03 -0400
commit84a48e5732d9dd0c98fda3597352e4b16f35a7ad (patch)
tree0a3c987061a90ed84f82e82123d6cbabeb6d2488 /lib/checksrc.pl
parent1aa899ff38548a5d1c196f5c9ad7047f0fae3f5a (diff)
checksrc: Add LoadLibrary to the banned functions list
LoadLibrary was supplanted by Curl_load_library for security reasons in 6df916d.
Diffstat (limited to 'lib/checksrc.pl')
-rwxr-xr-xlib/checksrc.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index aacb242b5..f31083a63 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -421,7 +421,13 @@ sub scanfile {
}
# scan for use of banned functions
- if($l =~ /^(.*\W)(sprintf|vsprintf|strcat|strncat|_mbscat|_mbsncat|_tcscat|_tcsncat|wcscat|wcsncat|gets)\s*\(/) {
+ if($l =~ /^(.*\W)
+ (gets|
+ v?sprintf|
+ (str|_mbs|_tcs|_wcs)n?cat|
+ LoadLibrary(Ex)?(A|W)?)
+ \s*\(
+ /x) {
checkwarn("BANNEDFUNC",
$line, length($1), $file, $ol,
"use of $2 is banned");