diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/lint/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl index 1b9a3d4e67..8275daaebf 100755 --- a/util/lint/checkpatch.pl +++ b/util/lint/checkpatch.pl @@ -6238,6 +6238,12 @@ sub process { # } # } +# strlcpy uses that should likely be strscpy + if ($line =~ /\bstrlcpy\s*\(/) { + WARN("STRLCPY", + "Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw\@mail.gmail.com/\n" . $herecurr); + } + # typecasts on min/max could be min_t/max_t if ($perl_version_ok && defined $stat && |