Merge pull request #8400 from radarhere/geometry

Check image value before use
This commit is contained in:
mergify[bot] 2024-09-28 23:07:00 +00:00 committed by GitHub
commit c6e07d0272
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -791,15 +791,15 @@ ImagingGenericTransform(
char *out; char *out;
double xx, yy; double xx, yy;
if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0) {
return (Imaging)ImagingError_ModeError();
}
ImagingTransformFilter filter = getfilter(imIn, filterid); ImagingTransformFilter filter = getfilter(imIn, filterid);
if (!filter) { if (!filter) {
return (Imaging)ImagingError_ValueError("bad filter number"); return (Imaging)ImagingError_ValueError("bad filter number");
} }
if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0) {
return (Imaging)ImagingError_ModeError();
}
ImagingCopyPalette(imOut, imIn); ImagingCopyPalette(imOut, imIn);
ImagingSectionEnter(&cookie); ImagingSectionEnter(&cookie);