Fixed bug in extractLine function which was returning incorrect line # when the line contains multiple vuln types

This commit is contained in:
Matthew E. Grahlman committed 2021-10-09 10:55:39 -04:00
1 parent 3128789777
commit d8e3a694f2
1 file changed
+2
+2
View File
@@ -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++