mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 04:34:46 +01:00
Fixed bug in extractLine function which was returning incorrect line # when the line contains multiple vuln types
This commit is contained in:
1 parent
3128789777
commit
d8e3a694f2
1 file changed
+2
@@ -212,6 +212,8 @@ func extractLine(patchContent string, leak Leak, lineLookup map[string]bool) int
|
||||
if _, ok := lineLookup[fmt.Sprintf("%s%s%d%s", leak.Offender, leak.Line, lineNumber, leak.File)]; !ok {
|
||||
lineLookup[fmt.Sprintf("%s%s%d%s", leak.Offender, leak.Line, lineNumber, leak.File)] = true
|
||||
return lineNumber
|
||||
} else if ok {
|
||||
return lineNumber
|
||||
}
|
||||
}
|
||||
currLine++
|
||||
|
||||
Reference in new issue
Block a user