Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check image value before use #8400

Merged
merged 2 commits into from
Sep 28, 2024
Merged

Check image value before use #8400

merged 2 commits into from
Sep 28, 2024

Conversation

radarhere
Copy link
Member

Similar to #8398, check the value of imIn before using it.

ImagingTransformFilter filter = getfilter(imIn, filterid);
if (!filter) {
return (Imaging)ImagingError_ValueError("bad filter number");
}
if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0) {
return (Imaging)ImagingError_ModeError();
}

getfilter(Imaging im, int filterid) {
switch (filterid) {
case IMAGING_TRANSFORM_NEAREST:
if (im->image8) {

@hugovk hugovk added the automerge Automatically merge PRs that are ready label Sep 28, 2024
@hugovk
Copy link
Member

hugovk commented Sep 28, 2024

(I misclicked the "update branch" button, but never mind.)

@mergify mergify bot merged commit c6e07d0 into python-pillow:main Sep 28, 2024
47 of 49 checks passed
@radarhere radarhere deleted the geometry branch September 29, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PRs that are ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants