mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3263f1105f |
@@ -175,7 +175,7 @@ var (
|
|||||||
func findName(versionResources map[string]string) string {
|
func findName(versionResources map[string]string) string {
|
||||||
// PE files found in the wild _not_ authored by Microsoft seem to use ProductName as a clear
|
// PE files found in the wild _not_ authored by Microsoft seem to use ProductName as a clear
|
||||||
// identifier of the software
|
// identifier of the software
|
||||||
nameFields := []string{"ProductName", "FileDescription", "InternalName", "OriginalFilename"}
|
nameFields := []string{"InternalName", "OriginalFilename", "ProductName", "FileDescription"}
|
||||||
|
|
||||||
if isMicrosoft(versionResources) {
|
if isMicrosoft(versionResources) {
|
||||||
// Microsoft seems to be consistent using the FileDescription, with a few that are blank and have
|
// Microsoft seems to be consistent using the FileDescription, with a few that are blank and have
|
||||||
@@ -188,6 +188,9 @@ func findName(versionResources map[string]string) string {
|
|||||||
if value == "" {
|
if value == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = strings.TrimSuffix(strings.ReplaceAll(value, " ", "."), ".dll")
|
||||||
|
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user