File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6997,10 +6997,22 @@ sub process {
6997
6997
# }
6998
6998
# }
6999
6999
7000
+ # strcpy uses that should likely be strscpy
7001
+ if ($line =~ / \b strcpy\s *\( / ) {
7002
+ WARN(" STRCPY" ,
7003
+ " Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88\n " . $herecurr );
7004
+ }
7005
+
7000
7006
# strlcpy uses that should likely be strscpy
7001
7007
if ($line =~ / \b strlcpy\s *\( / ) {
7002
7008
WARN(" STRLCPY" ,
7003
- " Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw\@ mail.gmail.com/\n " . $herecurr );
7009
+ " Prefer strscpy over strlcpy - see: https://github.com/KSPP/linux/issues/89\n " . $herecurr );
7010
+ }
7011
+
7012
+ # strncpy uses that should likely be strscpy or strscpy_pad
7013
+ if ($line =~ / \b strncpy\s *\( / ) {
7014
+ WARN(" STRNCPY" ,
7015
+ " Prefer strscpy, strscpy_pad, or __nonstring over strncpy - see: https://github.com/KSPP/linux/issues/90\n " . $herecurr );
7004
7016
}
7005
7017
7006
7018
# typecasts on min/max could be min_t/max_t
You can’t perform that action at this time.
0 commit comments