From c7752f0f6ceb3da96261b243269f97529c057d78 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Wed, 8 Dec 2021 15:28:47 -0500 Subject: [PATCH] fix panic from reading nonexistent reader (#658) Signed-off-by: Alex Goodman --- syft/pkg/cataloger/deb/cataloger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syft/pkg/cataloger/deb/cataloger.go b/syft/pkg/cataloger/deb/cataloger.go index 39c893747..418533834 100644 --- a/syft/pkg/cataloger/deb/cataloger.go +++ b/syft/pkg/cataloger/deb/cataloger.go @@ -138,7 +138,7 @@ func getAdditionalFileListing(resolver source.FileResolver, dbLocation source.Lo if conffilesReader != nil && conffilesLocation != nil { defer internal.CloseAndLogError(conffilesReader, conffilesLocation.VirtualPath) // attach the file list - files = append(files, parseDpkgConffileInfo(md5Reader)...) + files = append(files, parseDpkgConffileInfo(conffilesReader)...) // keep a record of the file where this was discovered locations = append(locations, *conffilesLocation)