From bc9740d50a38e9660f2f98ed91d84c6d8799cf70 Mon Sep 17 00:00:00 2001 From: Kenny Moens Date: Thu, 3 Nov 2022 15:38:49 +0100 Subject: [PATCH] javascript cataloger: node binary: nil pointer dereference (#1313) Co-authored-by: Keith Zantow --- syft/pkg/cataloger/javascript/parse_node_binary.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syft/pkg/cataloger/javascript/parse_node_binary.go b/syft/pkg/cataloger/javascript/parse_node_binary.go index e7933fcbd3f..51ec307c016 100644 --- a/syft/pkg/cataloger/javascript/parse_node_binary.go +++ b/syft/pkg/cataloger/javascript/parse_node_binary.go @@ -36,8 +36,8 @@ func parseNodeBinary(_ source.FileResolver, _ *generic.Environment, reader sourc // TODO add node specific metadata to the packages to help with vulnerability matching if p != nil { p.Language = pkg.JavaScript + p.SetID() return []pkg.Package{*p}, nil, nil } - p.SetID() return nil, nil, nil }