diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-linter/linter.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/syz-linter/linter.go b/tools/syz-linter/linter.go index d0cd0879b..76168c7c9 100644 --- a/tools/syz-linter/linter.go +++ b/tools/syz-linter/linter.go @@ -252,7 +252,7 @@ func (pass *Pass) checkFlagDefinition(n *ast.CallExpr) { // checkLogErrorFormat warns about log/error messages starting with capital letter or ending with a period. func (pass *Pass) checkLogErrorFormat(n *ast.CallExpr) { arg, newLine, sure := pass.logFormatArg(n) - if arg == -1 { + if arg == -1 || len(n.Args) <= arg { return } val, ok := stringLit(n.Args[arg]) @@ -302,6 +302,9 @@ func (pass *Pass) logFormatArg(n *ast.CallExpr) (arg int, newLine, sure bool) { } return 1, true, true } + if fun.Sel.String() == "Logf" { + return 1, false, true + } return -1, false, false } |
