]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
checksrc: disallow `atoi` and `atol` globally
authorViktor Szakats <commit@vsz.me>
Wed, 12 Nov 2025 22:37:06 +0000 (23:37 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 13 Nov 2025 13:28:25 +0000 (14:28 +0100)
No longer used in core and test code.

Also: allowlist in docs/examples.

Closes #19508

docs/examples/.checksrc
scripts/checksrc.pl
src/.checksrc

index e35dccc7261d77982ea99400f9316147293edb06..c47627467ff336fafc4ca7f11db632fbe03000a3 100644 (file)
@@ -2,6 +2,8 @@
 #
 # SPDX-License-Identifier: curl
 
+allowfunc atoi
+allowfunc atol
 allowfunc fclose
 allowfunc fdopen
 allowfunc fopen
index 5dcad3e31526213a6bd58ddee6c28ad1db0fe2d2..caf60e1c4dbd0c5b35dc97bced916b42befa20d6 100755 (executable)
@@ -72,6 +72,8 @@ my %banfunc = (
     "strtok_r" => 1,
     "strtol" => 1,
     "strtoul" => 1,
+    "atoi" => 1,
+    "atol" => 1,
     "_mbscat" => 1,
     "_mbsncat" => 1,
     "_tcscat" => 1,
index 37b81cfe2ff42eb4e07dbb92dcb1f6798a8fffda..bc97c06028daafa121e195906c609a422f3102bf 100644 (file)
@@ -3,4 +3,3 @@
 # SPDX-License-Identifier: curl
 
 enable STDERR
-banfunc atoi