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