mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Vulnerable map function is not called on windows
This commit is contained in:
parent
aa8cfce94c
commit
22ff3f4358
|
@ -154,7 +154,7 @@ class ImageFile(Image.Image):
|
|||
if d == "raw" and a[0] == self.mode and a[0] in Image._MAPMODES:
|
||||
try:
|
||||
if hasattr(Image.core, "map"):
|
||||
# use built-in mapper
|
||||
# use built-in mapper WIN32 only
|
||||
self.map = Image.core.map(self.filename)
|
||||
self.map.seek(o)
|
||||
self.im = self.map.readimage(
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
from helper import PillowTestCase, unittest
|
||||
import sys
|
||||
|
||||
from PIL import Image
|
||||
|
||||
|
||||
@unittest.skipIf(sys.platform.startswith('win32'), "Win32 does not call map_buffer")
|
||||
class TestMap(PillowTestCase):
|
||||
def test_overflow(self):
|
||||
# There is the potential to overflow comparisons in map.c
|
||||
|
|
Loading…
Reference in New Issue
Block a user