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 is not empty before use #1

Conversation

radarhere
Copy link

Suggestion for python-pillow#8398

The same problem that you've fixed also exists at

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) {

@radarhere
Copy link
Author

Your PR was merged, so I've turned this into python-pillow#8400 instead.

@radarhere radarhere closed this Sep 20, 2024
@radarhere radarhere deleted the fix/null-check-before-dereference-imIn branch September 20, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant