mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-07 22:04:46 +03:00
Merge 2.5.x branch to master, get 2.5.3 in CHANGES.rst
This commit is contained in:
commit
3e4d3c6077
|
@ -61,6 +61,11 @@ Changelog (Pillow)
|
||||||
- Test PalmImagePlugin and method to skip known bad tests #776
|
- Test PalmImagePlugin and method to skip known bad tests #776
|
||||||
[hugovk, wiredfool]
|
[hugovk, wiredfool]
|
||||||
|
|
||||||
|
2.5.3 (2014-08-18)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed CVE-2014-3598, a DOS in the Jpeg2KImagePlugin
|
||||||
|
[Andrew Drake]
|
||||||
|
|
||||||
2.5.2 (2014-08-13)
|
2.5.2 (2014-08-13)
|
||||||
------------------
|
------------------
|
||||||
|
@ -68,7 +73,6 @@ Changelog (Pillow)
|
||||||
- Fixed CVE-2014-3589, a DOS in the IcnsImagePlugin (backport)
|
- Fixed CVE-2014-3589, a DOS in the IcnsImagePlugin (backport)
|
||||||
[Andrew Drake]
|
[Andrew Drake]
|
||||||
|
|
||||||
|
|
||||||
2.5.1 (2014-07-10)
|
2.5.1 (2014-07-10)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,9 @@ def _parse_jp2_header(fp):
|
||||||
else:
|
else:
|
||||||
hlen = 8
|
hlen = 8
|
||||||
|
|
||||||
|
if lbox < hlen:
|
||||||
|
raise SyntaxError('Invalid JP2 header length')
|
||||||
|
|
||||||
if tbox == b'jp2h':
|
if tbox == b'jp2h':
|
||||||
header = fp.read(lbox - hlen)
|
header = fp.read(lbox - hlen)
|
||||||
break
|
break
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# ;-)
|
# ;-)
|
||||||
|
|
||||||
VERSION = '1.1.7' # PIL version
|
VERSION = '1.1.7' # PIL version
|
||||||
PILLOW_VERSION = '2.5.0' # Pillow
|
PILLOW_VERSION = '2.5.3' # Pillow
|
||||||
|
|
||||||
_plugins = ['BmpImagePlugin',
|
_plugins = ['BmpImagePlugin',
|
||||||
'BufrStubImagePlugin',
|
'BufrStubImagePlugin',
|
||||||
|
|
11
Tests/check_j2k_dos.py
Normal file
11
Tests/check_j2k_dos.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Tests potential DOS of Jpeg2kImagePlugin with 0 length block.
|
||||||
|
# Run from anywhere that PIL is importable.
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
|
if bytes is str:
|
||||||
|
Image.open(BytesIO(bytes('\x00\x00\x00\x0cjP\x20\x20\x0d\x0a\x87\x0a\x00\x00\x00\x00hang')))
|
||||||
|
else:
|
||||||
|
Image.open(BytesIO(bytes('\x00\x00\x00\x0cjP\x20\x20\x0d\x0a\x87\x0a\x00\x00\x00\x00hang', 'latin-1')))
|
||||||
|
|
|
@ -57,6 +57,10 @@ class TestFileIcns(PillowTestCase):
|
||||||
if not enable_jpeg2k:
|
if not enable_jpeg2k:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self.skipKnownBadTest("Jpeg2000 hangs on Travis on OSX",
|
||||||
|
platform='darwin',
|
||||||
|
travis=True)
|
||||||
|
|
||||||
im = Image.open('Tests/images/pillow3.icns')
|
im = Image.open('Tests/images/pillow3.icns')
|
||||||
for w, h, r in im.info['sizes']:
|
for w, h, r in im.info['sizes']:
|
||||||
wr = w * r
|
wr = w * r
|
||||||
|
|
|
@ -18,6 +18,9 @@ class TestFileJpeg2k(PillowTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
if "jpeg2k_encoder" not in codecs or "jpeg2k_decoder" not in codecs:
|
if "jpeg2k_encoder" not in codecs or "jpeg2k_decoder" not in codecs:
|
||||||
self.skipTest('JPEG 2000 support not available')
|
self.skipTest('JPEG 2000 support not available')
|
||||||
|
self.skipKnownBadTest("Jpeg2000 hangs on Travis on OSX",
|
||||||
|
platform='darwin',
|
||||||
|
travis=True)
|
||||||
|
|
||||||
def roundtrip(self, im, **options):
|
def roundtrip(self, im, **options):
|
||||||
out = BytesIO()
|
out = BytesIO()
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
* See the README file for information on usage and redistribution.
|
* See the README file for information on usage and redistribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PILLOW_VERSION "2.5.0"
|
#define PILLOW_VERSION "2.5.3"
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user