dimension check
This commit is contained in:
parent
188f6e931e
commit
02b0a91ea1
1 changed files with 3 additions and 0 deletions
|
@ -105,6 +105,9 @@ proc decodeGif*(data: string): Gif {.raises: [PixieError].} =
|
||||||
|
|
||||||
pos += 9
|
pos += 9
|
||||||
|
|
||||||
|
if imageWidth > screenWidth or imageHeight > screenHeight:
|
||||||
|
raise newException(PixieError, "Invalid GIF frame dimensions")
|
||||||
|
|
||||||
if pos + localColorTableSize * 3 > data.len:
|
if pos + localColorTableSize * 3 > data.len:
|
||||||
failInvalid()
|
failInvalid()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue