diff --git a/src/libImaging/Convert.c b/src/libImaging/Convert.c index 1fa74a13b3b..9012cfcd74b 100644 --- a/src/libImaging/Convert.c +++ b/src/libImaging/Convert.c @@ -1595,7 +1595,7 @@ convert( return (Imaging)ImagingError_ValueError("conversion not supported"); #else static char buf[100]; - sprintf(buf, "conversion from %.10s to %.10s not supported", imIn->mode, mode); + snprintf(buf, 100, "conversion from %.10s to %.10s not supported", imIn->mode, mode); return (Imaging)ImagingError_ValueError(buf); #endif } @@ -1645,8 +1645,9 @@ ImagingConvertTransparent(Imaging imIn, const char *mode, int r, int g, int b) { #else { static char buf[100]; - sprintf( + snprintf( buf, + 100, "conversion from %.10s to %.10s not supported in convert_transparent", imIn->mode, mode);