File: win32/PlatWin.cxx
LoadLibraryEx with the LOAD_LIBRARY_SEARCH_SYSTEM32 flag fails (returns NULL) if hotfix KB2533623 on Windows 7 is not installed.
Please see the attached patch which works for all supported operating systems.
I have already proposed a similar solution at the time I have originally reported the binary planting bug. It would have also been appreciated if credits for the security report & fix would have been given.
gcc supports neither #pragma comment(lib, "shlwapi.lib") nor _tcscpy_s.
You did not respond to my 8/Oct "What problem?" message in the previous thread. I still can't work out why you think there is a problem with the LoadLibraryEx calls failing on unpatched Windows 7 since this just means falling back to GDI.
pragma:
I guess you have to add it to gcc using the -l parameter then:
-lshlwapi
_tcscpy_s:
Windows 7:
As a user of the scintilla component I'm expecting that the D2D init succeeds on Windows 7 regardless whether the mentioned hotfix is installed or not. For example if my application implements plugins which only work with D2D.
I believe this is a reasonable guarantee Scintilla should provide.
I also wish that such workarounds aren't necessary but unfortunately the reality is that there are still plenty of users with unpatched versions of Windows 7.
Last edit: mberchtold 2014-09-05
Its a simple piece of string manipulation that doesn't need #ifdef or shlwapi and should be implemented to be portable between compilers.
Should be fixed with [d488b9].
Related
Commit: [d488b9]