mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
panic parsing cyclonedx (#892)
This commit is contained in:
parent
b9b3ccecf9
commit
ee0a1d172c
1 changed files with 4 additions and 2 deletions
|
@ -47,8 +47,10 @@ func hasMetadata(p pkg.Package) bool {
|
|||
|
||||
func decodeComponent(c *cyclonedx.Component) *pkg.Package {
|
||||
values := map[string]string{}
|
||||
for _, p := range *c.Properties {
|
||||
values[p.Name] = p.Value
|
||||
if c.Properties != nil {
|
||||
for _, p := range *c.Properties {
|
||||
values[p.Name] = p.Value
|
||||
}
|
||||
}
|
||||
|
||||
p := &pkg.Package{
|
||||
|
|
Loading…
Reference in a new issue