From 83be3d268d0a109eff6bbdd9b453edcac6c6c33f Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Tue, 18 Nov 2008 22:27:00 +0000 Subject: Merged revisions 67266 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67266 | amaury.forgeotdarc | 2008-11-18 23:19:37 +0100 (mar., 18 nov. 2008) | 4 lines #4317: Fix an Array Bounds Read in imageop.rgb2rgb8. Will backport to 2.4. ........ --- Lib/test/test_imageop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/test/test_imageop.py') diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py index 6deaa348cb..9063b22090 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 -- cgit v1.2.1