Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jrschumacher committed Nov 7, 2024
1 parent 4fc28c3 commit 62d9656
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/handlers/tdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ func (h Handler) InspectTDF(toInspect []byte) (TDFInspect, []error) {
r := TDFInspect{
NanoHeader: &header,
}
remainder := uint32(len(toInspect)) - size
if remainder < 18 {
remainder := uint32(len(toInspect) - int(size))

Check failure on line 159 in pkg/handlers/tdf.go

View workflow job for this annotation

GitHub Actions / lint

G115: integer overflow conversion int -> uint32 (gosec)
eighteen := uint32(18) // TODO: Rename. Not sure what this value is at present

Check failure on line 160 in pkg/handlers/tdf.go

View workflow job for this annotation

GitHub Actions / lint

Magic number: 18, in <argument> detected (mnd)
if remainder < eighteen {
return r, []error{ErrTDFInspectFailNotValidTDF}
}
return r, nil
Expand Down

0 comments on commit 62d9656

Please sign in to comment.