Skip to content

Commit

Permalink
jp2c: Fail probe faster
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Apr 10, 2024
1 parent a3f5e29 commit 79992b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions format/jpeg/jp2c.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ var jp2Markers = scalar.UintMap{
}

func jp2cDecode(d *decode.D) any {
if d.PeekUintBits(16) != JP2_SOC {
d.Fatalf("no SOC marker")
}

seenSOC := false
seenSIZ := false
seenEOC := false
Expand Down

0 comments on commit 79992b3

Please sign in to comment.