File tree 2 files changed +6
-2
lines changed
pkg/fanal/analyzer/pkg/dpkg
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ func (a *dpkgLicenseAnalyzer) parseCopyright(r xio.ReadSeekerAt) ([]types.Licens
90
90
l = normalizeLicense (l )
91
91
if l != "" {
92
92
for _ , lic := range licensing .SplitLicenses (l ) {
93
+ if lic == "" {
94
+ continue
95
+ }
96
+
93
97
lic = licensing .Normalize (lic )
94
98
if ! slices .Contains (licenses , lic ) {
95
99
licenses = append (licenses , lic )
@@ -101,7 +105,7 @@ func (a *dpkgLicenseAnalyzer) parseCopyright(r xio.ReadSeekerAt) ([]types.Licens
101
105
license := commonLicenseReferenceRegexp .FindStringSubmatch (line )
102
106
if len (license ) == 2 {
103
107
l := licensing .Normalize (license [1 ])
104
- if ! slices .Contains (licenses , l ) {
108
+ if l != "" && ! slices .Contains (licenses , l ) {
105
109
licenses = append (licenses , l )
106
110
}
107
111
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Files: contrib/minizip/*
47
47
Copyright: 1998-2010 Gilles Vollant
48
48
2007-2008 Even Rouault
49
49
2009-2010 Mathias Svensson
50
- License: Zlib
50
+ License: Zlib,
51
51
52
52
Files: debian/*
53
53
Copyright: 2000-2017 Mark Brown
You can’t perform that action at this time.
0 commit comments