Check image value before use by radarhere · Pull Request #8400 · python-pillow/Pillow
Navigation Menu
{{ message }}
python-pillow / Pillow Public
- Notifications You must be signed in to change notification settings
- Fork 2.4k
Merged
mergify[bot] merged 2 commits intopython-pillow:mainfrom
Sep 28, 2024Merged
Check image value before use#8400
mergify[bot] merged 2 commits intopython-pillow:mainfrom
Check image value before use#8400
mergify[bot] merged 2 commits intopython-pillow:mainfrom
Conversation
Copy link Copy Markdown
Member
radarhere
commented
Sep 20, 2024
radarhere
commented
Similar to #8398, check the value of imIn before using it.
Pillow/src/libImaging/Geometry.c
Lines 794 to 801 in b557876
| 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(); | |
| } |
Pillow/src/libImaging/Geometry.c
Lines 709 to 712 in b557876
| getfilter(Imaging im, int filterid) { | |
| switch (filterid) { | |
| case IMAGING_TRANSFORM_NEAREST: | |
| if (im->image8) { |
radarhere
mentioned this pull request
hugovk approved these changes Sep 28, 2024
Copy link Copy Markdown
Member
hugovk
commented
Sep 28, 2024
hugovk commented
Sep 28, 2024(I misclicked the "update branch" button, but never mind.)
mergify
bot
merged commit
c6e07d0
into
python-pillow:main
radarhere
deleted the
geometry
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment