summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-11-18 22:19:37 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-11-18 22:19:37 (GMT)
commit7cfe7ea745d6222103c32c089e591229de2c2817 (patch)
tree4d2abf8d9d6b3bbe1b09093d502ddaa3f6c7ef9b /Lib
parent273c233c78d36f65059342981dcdc5b212a7e558 (diff)
downloadcpython-7cfe7ea745d6222103c32c089e591229de2c2817.zip
cpython-7cfe7ea745d6222103c32c089e591229de2c2817.tar.gz
cpython-7cfe7ea745d6222103c32c089e591229de2c2817.tar.bz2
#4317: Fix an Array Bounds Read in imageop.rgb2rgb8.
Will backport to 2.4.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/test/test_imageop.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py
index 6deaa34..9063b22 100755
--- a/Lib/test/test_imageop.py
+++ b/Lib/test/test_imageop.py
@@ -15,6 +15,7 @@ SIZES = (1, 2, 3, 4)
_VALUES = (1, 2, 2**10, 2**15-1, 2**15, 2**15+1, 2**31-2, 2**31-1)
VALUES = tuple( -x for x in reversed(_VALUES) ) + (0,) + _VALUES
AAAAA = "A" * 1024
+MAX_LEN = 2**20
class InputValidationTests(unittest.TestCase):
@@ -26,7 +27,7 @@ class InputValidationTests(unittest.TestCase):
strlen = abs(width * height)
if size:
strlen *= size
- if strlen < 1024:
+ if strlen < MAX_LEN:
data = "A" * strlen
else:
data = AAAAA