mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 01:43:17 +03:00
Use snprintf instead of sprintf
This commit is contained in:
parent
5f4504bb03
commit
518ee3722a
|
@ -1595,7 +1595,7 @@ convert(
|
||||||
return (Imaging)ImagingError_ValueError("conversion not supported");
|
return (Imaging)ImagingError_ValueError("conversion not supported");
|
||||||
#else
|
#else
|
||||||
static char buf[100];
|
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);
|
return (Imaging)ImagingError_ValueError(buf);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1645,8 +1645,9 @@ ImagingConvertTransparent(Imaging imIn, const char *mode, int r, int g, int b) {
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
static char buf[100];
|
static char buf[100];
|
||||||
sprintf(
|
snprintf(
|
||||||
buf,
|
buf,
|
||||||
|
100,
|
||||||
"conversion from %.10s to %.10s not supported in convert_transparent",
|
"conversion from %.10s to %.10s not supported in convert_transparent",
|
||||||
imIn->mode,
|
imIn->mode,
|
||||||
mode);
|
mode);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user