Issue #24264: Fixed buffer overflow in the imageop module.
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py
index 31edbd1..9589bf2 100644
--- a/Lib/test/test_imageop.py
+++ b/Lib/test/test_imageop.py
@@ -61,7 +61,9 @@
         self.check("rgb82rgb")
         self.check("rgb2grey")
         self.check("grey2rgb")
-
+        # Issue #24264: Buffer overflow
+        with self.assertRaises(imageop.error):
+            imageop.grey2rgb('A'*256, 1, 129)
 
 def test_main():