mirror of
https://github.com/securego/gosec.git
synced 2025-07-15 01:04:43 +02:00
Restrict the maximum depth when tracking the slice bounds
Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
This commit is contained in:
committed by
Cosmin Cojocar
parent
7e2d8d35f4
commit
f338a98bf3
@ -370,7 +370,7 @@ func (gosec *Analyzer) CheckAnalyzers(pkg *packages.Package) {
|
||||
// buildSSA runs the SSA pass which builds the SSA representation of the package. It handles gracefully any panic.
|
||||
func (gosec *Analyzer) buildSSA(pkg *packages.Package) (interface{}, error) {
|
||||
defer func() {
|
||||
if r := recover(); r = nil {
|
||||
if r := recover(); r != nil {
|
||||
gosec.logger.Printf("Panic when running SSA analyser on package: %s", pkg.Name)
|
||||
}
|
||||
}()
|
||||
|
Reference in New Issue
Block a user