The call to FreeImage_OpenMultiBitmap crashes the calling Windows process if filename is longer than 255 characters and Windows Long Path is disabled.
- the call never returns any value, even NULL.
- the calling Windows process silently crashes
- and even Natural Exception is not created.
The expected behavior: if file name violates Windows restrictions, the call to function FreeImage_OpenMultiBitmap would return NULL value instead of crashing the calling process
The attached example reproduces the issue.
Here is a patch.
Thanks, Mikhail!
Will this fix the part of upcoming official release?
I don't know, it is up to @drolon, I am not a maintainer. That being said, I have GitHub clone of FreeImage that probably includes this patch (can't remember honestly). https://github.com/mnaydenov/FreeImage-Adv
If you are not afraid to compile from code, you can give it a try. (Read about the branches, because it is quite busy there!)
Thanks, Mihail. But my bosses want to take a fix with official release. I'll ask @drolon