0647175
diff -rupN --no-dereference Pillow-7.2.0/src/libImaging/Convert.c Pillow-7.2.0-new/src/libImaging/Convert.c
0647175
--- Pillow-7.2.0/src/libImaging/Convert.c	2020-06-30 09:50:35.000000000 +0200
0647175
+++ Pillow-7.2.0-new/src/libImaging/Convert.c	2021-07-24 22:47:24.437311246 +0200
0647175
@@ -1664,9 +1664,8 @@ convert(Imaging imOut, Imaging imIn, con
0647175
 #ifdef notdef
0647175
         return (Imaging) ImagingError_ValueError("conversion not supported");
0647175
 #else
0647175
-        static char buf[256];
0647175
-        /* FIXME: may overflow if mode is too large */
0647175
-        sprintf(buf, "conversion from %s to %s not supported", imIn->mode, mode);
0647175
+      static char buf[100];
0647175
+      snprintf(buf, 100, "conversion from %s to %s not supported", imIn->mode, mode);
0647175
         return (Imaging) ImagingError_ValueError(buf);
0647175
 #endif
0647175
     }
0647175
@@ -1724,9 +1723,8 @@ ImagingConvertTransparent(Imaging imIn,
0647175
     }
0647175
 #else
0647175
     {
0647175
-      static char buf[256];
0647175
-      /* FIXME: may overflow if mode is too large */
0647175
-      sprintf(buf, "conversion from %s to %s not supported in convert_transparent", imIn->mode, mode);
0647175
+      static char buf[100];
0647175
+      snprintf(buf, 100, "conversion from %.10s to %.10s not supported in convert_transparent", imIn->mode, mode);
0647175
       return (Imaging) ImagingError_ValueError(buf);
0647175
     }
0647175
 #endif