Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoubfaouzi committed Nov 26, 2024
1 parent 36f3e7d commit ffc8044
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion dotnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,11 +724,14 @@ func (pe *File) parseCLRHeaderDirectory(rva, size uint32) error {
table.Content, n, err = pe.parseMetadataMethodSpecTable(offset)
case GenericParamConstraint: // 0x2c
table.Content, n, err = pe.parseMetadataGenericParamConstraintTable(offset)

default:
pe.logger.Warnf("unhandled metadata table %d %s offset 0x%x cols %d",
tableIndex, MetadataTableIndexToString(tableIndex), offset, table.CountCols)
}
if err != nil {
pe.logger.Warnf("parsing metadata table %s failed with %v",
MetadataTableIndexToString(tableIndex), err)
}
offset += n

}
Expand Down
2 changes: 1 addition & 1 deletion dotnet_metadata_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ type AssemblyRefProcessorTableRow struct {

// AssemblyRefOS 0x25
type AssemblyRefOSTableRow struct {
OSPlatformId uint32 `json:"os_platform_id"` // a 4-byte constant
OSPlatformID uint32 `json:"os_platform_id"` // a 4-byte constant
OSMajorVersion uint32 `json:"os_major_version"` // a 4-byte constant
OSMinorVersion uint32 `json:"os_minor_version"` // a 4-byte constan)
AssemblyRef uint32 `json:"assembly_ref"` // an index into the AssemblyRef table
Expand Down
4 changes: 2 additions & 2 deletions security.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,12 @@ func parseAuthenticodeContent(content []byte) (AuthenticodeContent, error) {
if err != nil {
return AuthenticodeContent{}, err
}
hashFunction, algorithmId, err := parseHashAlgorithm(authenticodeContent.MessageDigest.DigestAlgorithm)
hashFunction, algorithmID, err := parseHashAlgorithm(authenticodeContent.MessageDigest.DigestAlgorithm)
if err != nil {
return AuthenticodeContent{}, err
}
return AuthenticodeContent{
Algorithm: algorithmId,
Algorithm: algorithmID,
HashFunction: hashFunction,
HashResult: authenticodeContent.MessageDigest.Digest,
}, nil
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (pe *File) ParseVersionResources() (map[string]string, error) {
}
}
case VarFileInfoString:
break
// TODO
default:
break
}
Expand Down

0 comments on commit ffc8044

Please sign in to comment.