Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63581 )
Change subject: util/lint/checkpatch.pl: Update to v5.18-2 add strlcpy check ......................................................................
util/lint/checkpatch.pl: Update to v5.18-2 add strlcpy check
Signed-off-by: Elyes Haouas ehaouas@noos.fr Change-Id: Ic4eaa3f26bcd60ea509a52d5715c7ce1f43b6d3d --- M util/lint/checkpatch.pl 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/63581/1
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl index f7fb0fa..b5184bd 100755 --- a/util/lint/checkpatch.pl +++ b/util/lint/checkpatch.pl @@ -6226,6 +6226,12 @@ # } # }
+# 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=V6A6G1oUZcprmkn..." . $herecurr); + } + # typecasts on min/max could be min_t/max_t if ($perl_version_ok && defined $stat &&