| Summary: | Windows Imaging Component backend for SDL_image | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | Alexey <alexey.petruchik> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | 2.0.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| Attachments: |
patch
modified patch |
||
Thank you for providing a patch. In WIC_LoadImage() the return value of SDL_malloc() is not checked for being not NULL. It can be null if there is not enough memory is available. This could lead to a crash later (apart from not loading the image anyway :). There is no need to check the variable memoryBuffer before SDL_free(). It accepts NULL pointers. Created attachment 1982 [details]
modified patch
I've uploaded modified path with fixes to mentioned issues. Is there anything else preventing from merging this patch to upstream? It would be really great to see this patch finally merged. Added, thanks! https://hg.libsdl.org/SDL_image/rev/97006d0351fe |
Created attachment 1980 [details] patch Windows Imaging Component backend for SDL2_image. Just like ImageIO\UIImage for OS X. Can load PNG\JPG\TIF. Patch was made for revision 2b0ada991468. Backend can be enabled by SDL_IMAGE_USE_WIC_BACKEND define.