mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
tests for Fli OOB reads
This commit is contained in:
parent
8d4f3c0c5f
commit
19ff42bd68
61
Tests/check_fli_oob.py
Normal file
61
Tests/check_fli_oob.py
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
repro_ss2 = ('images/fli_oob/06r/06r00.fli',
|
||||||
|
'images/fli_oob/06r/others/06r01.fli',
|
||||||
|
'images/fli_oob/06r/others/06r02.fli',
|
||||||
|
'images/fli_oob/06r/others/06r03.fli',
|
||||||
|
'images/fli_oob/06r/others/06r04.fli'
|
||||||
|
)
|
||||||
|
|
||||||
|
repro_lc = ('images/fli_oob/05r/05r00.fli',
|
||||||
|
'images/fli_oob/05r/others/05r03.fli',
|
||||||
|
'images/fli_oob/05r/others/05r06.fli',
|
||||||
|
'images/fli_oob/05r/others/05r05.fli',
|
||||||
|
'images/fli_oob/05r/others/05r01.fli',
|
||||||
|
'images/fli_oob/05r/others/05r04.fli',
|
||||||
|
'images/fli_oob/05r/others/05r02.fli',
|
||||||
|
'images/fli_oob/05r/others/05r07.fli',
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
repro_advance = ('images/fli_oob/03r/03r00.fli',
|
||||||
|
'images/fli_oob/03r/others/03r01.fli',
|
||||||
|
'images/fli_oob/03r/others/03r09.fli',
|
||||||
|
'images/fli_oob/03r/others/03r11.fli',
|
||||||
|
'images/fli_oob/03r/others/03r05.fli',
|
||||||
|
'images/fli_oob/03r/others/03r10.fli',
|
||||||
|
'images/fli_oob/03r/others/03r06.fli',
|
||||||
|
'images/fli_oob/03r/others/03r08.fli',
|
||||||
|
'images/fli_oob/03r/others/03r03.fli',
|
||||||
|
'images/fli_oob/03r/others/03r07.fli',
|
||||||
|
'images/fli_oob/03r/others/03r02.fli',
|
||||||
|
'images/fli_oob/03r/others/03r04.fli',
|
||||||
|
)
|
||||||
|
|
||||||
|
repro_brun = ('images/fli_oob/04r/initial.fli',
|
||||||
|
'images/fli_oob/04r/others/04r02.fli',
|
||||||
|
'images/fli_oob/04r/others/04r05.fli',
|
||||||
|
'images/fli_oob/04r/others/04r04.fli',
|
||||||
|
'images/fli_oob/04r/others/04r03.fli',
|
||||||
|
'images/fli_oob/04r/others/04r01.fli',
|
||||||
|
'images/fli_oob/04r/04r00.fli',
|
||||||
|
)
|
||||||
|
|
||||||
|
repro_copy = ('images/fli_oob/02r/others/02r02.fli',
|
||||||
|
'images/fli_oob/02r/others/02r04.fli',
|
||||||
|
'images/fli_oob/02r/others/02r03.fli',
|
||||||
|
'images/fli_oob/02r/others/02r01.fli',
|
||||||
|
'images/fli_oob/02r/02r00.fli',
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
for path in repro_ss2 + repro_lc + repro_advance + repro_brun + repro_copy:
|
||||||
|
im = Image.open(path)
|
||||||
|
try:
|
||||||
|
im.load()
|
||||||
|
except Exception as msg:
|
||||||
|
print(msg)
|
||||||
|
|
||||||
|
|
BIN
Tests/images/fli_oob/02r/02r00.fli
Normal file
BIN
Tests/images/fli_oob/02r/02r00.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/02r/notes
Normal file
1
Tests/images/fli_oob/02r/notes
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Is this because a file-originating field is being interpreted as a *signed* int32, allowing it to provide negative values for 'advance'?
|
BIN
Tests/images/fli_oob/02r/others/02r01.fli
Normal file
BIN
Tests/images/fli_oob/02r/others/02r01.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/02r/others/02r02.fli
Normal file
BIN
Tests/images/fli_oob/02r/others/02r02.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/02r/others/02r03.fli
Normal file
BIN
Tests/images/fli_oob/02r/others/02r03.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/02r/others/02r04.fli
Normal file
BIN
Tests/images/fli_oob/02r/others/02r04.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/02r/reproducing
Normal file
1
Tests/images/fli_oob/02r/reproducing
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Image.open(...).seek(212)
|
BIN
Tests/images/fli_oob/03r/03r00.fli
Normal file
BIN
Tests/images/fli_oob/03r/03r00.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/03r/notes
Normal file
1
Tests/images/fli_oob/03r/notes
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ridiculous bytes value passed to ImagingFliDecode
|
BIN
Tests/images/fli_oob/03r/others/03r01.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r01.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r02.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r02.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r03.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r03.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r04.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r04.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r05.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r05.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r06.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r06.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r07.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r07.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r08.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r08.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r09.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r09.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r10.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r10.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/03r/others/03r11.fli
Normal file
BIN
Tests/images/fli_oob/03r/others/03r11.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/03r/reproducing
Normal file
1
Tests/images/fli_oob/03r/reproducing
Normal file
|
@ -0,0 +1 @@
|
||||||
|
im = Image.open(d); im.seek(0); im.getdata()
|
BIN
Tests/images/fli_oob/04r/04r00.fli
Normal file
BIN
Tests/images/fli_oob/04r/04r00.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/04r/initial.fli
Normal file
BIN
Tests/images/fli_oob/04r/initial.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/04r/notes
Normal file
1
Tests/images/fli_oob/04r/notes
Normal file
|
@ -0,0 +1 @@
|
||||||
|
failure to check input buffer (`data`) boundaries in BRUN chunk
|
BIN
Tests/images/fli_oob/04r/others/04r01.fli
Normal file
BIN
Tests/images/fli_oob/04r/others/04r01.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/04r/others/04r02.fli
Normal file
BIN
Tests/images/fli_oob/04r/others/04r02.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/04r/others/04r03.fli
Normal file
BIN
Tests/images/fli_oob/04r/others/04r03.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/04r/others/04r04.fli
Normal file
BIN
Tests/images/fli_oob/04r/others/04r04.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/04r/others/04r05.fli
Normal file
BIN
Tests/images/fli_oob/04r/others/04r05.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/04r/reproducing
Normal file
1
Tests/images/fli_oob/04r/reproducing
Normal file
|
@ -0,0 +1 @@
|
||||||
|
im = Image.open(d); im.seek(0); im.getdata()
|
BIN
Tests/images/fli_oob/05r/05r00.fli
Normal file
BIN
Tests/images/fli_oob/05r/05r00.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/05r/notes
Normal file
1
Tests/images/fli_oob/05r/notes
Normal file
|
@ -0,0 +1 @@
|
||||||
|
failure to check input buffer (`data`) boundaries in LC chunk
|
BIN
Tests/images/fli_oob/05r/others/05r01.fli
Normal file
BIN
Tests/images/fli_oob/05r/others/05r01.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/05r/others/05r02.fli
Normal file
BIN
Tests/images/fli_oob/05r/others/05r02.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/05r/others/05r03.fli
Normal file
BIN
Tests/images/fli_oob/05r/others/05r03.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/05r/others/05r04.fli
Normal file
BIN
Tests/images/fli_oob/05r/others/05r04.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/05r/others/05r05.fli
Normal file
BIN
Tests/images/fli_oob/05r/others/05r05.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/05r/others/05r06.fli
Normal file
BIN
Tests/images/fli_oob/05r/others/05r06.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/05r/others/05r07.fli
Normal file
BIN
Tests/images/fli_oob/05r/others/05r07.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/05r/reproducing
Normal file
1
Tests/images/fli_oob/05r/reproducing
Normal file
|
@ -0,0 +1 @@
|
||||||
|
im = Image.open(d); im.seek(0); im.getdata()
|
BIN
Tests/images/fli_oob/06r/06r00.fli
Normal file
BIN
Tests/images/fli_oob/06r/06r00.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/06r/notes
Normal file
1
Tests/images/fli_oob/06r/notes
Normal file
|
@ -0,0 +1 @@
|
||||||
|
failure to check input buffer (`data`) boundaries in SS2 chunk
|
BIN
Tests/images/fli_oob/06r/others/06r01.fli
Normal file
BIN
Tests/images/fli_oob/06r/others/06r01.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/06r/others/06r02.fli
Normal file
BIN
Tests/images/fli_oob/06r/others/06r02.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/06r/others/06r03.fli
Normal file
BIN
Tests/images/fli_oob/06r/others/06r03.fli
Normal file
Binary file not shown.
BIN
Tests/images/fli_oob/06r/others/06r04.fli
Normal file
BIN
Tests/images/fli_oob/06r/others/06r04.fli
Normal file
Binary file not shown.
1
Tests/images/fli_oob/06r/reproducing
Normal file
1
Tests/images/fli_oob/06r/reproducing
Normal file
|
@ -0,0 +1 @@
|
||||||
|
im = Image.open(d); im.seek(0); im.getdata()
|
Loading…
Reference in New Issue
Block a user