Skip to content

Commit

Permalink
Add a test for an image that is larger than 10000x10000
Browse files Browse the repository at this point in the history
  • Loading branch information
blakestoddard committed Dec 8, 2020
1 parent b5cd1fe commit 8572c5b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func Transform(img []byte, opt Options) ([]byte, error) {
return nil, err
}

fmt.Println(img)

// prevent pixel flooding attacks
// accept no larger than a 10,000 x 10,000 image
if imageMeta.Width*imageMeta.Height > 100000000 {
Expand Down
Loading

0 comments on commit 8572c5b

Please sign in to comment.