~registry/glib/glib-2-24

Viewing all changes in revision 7555.

  • Committer: Tor Lillqvist
  • Date: 2010-09-02 19:55:43 UTC
  • Revision ID: git-v1:86156c28b3b5a6cc2a3e22def530c355e9606504
Reduce DLL hijack risk on Windows

Don't call LoadLibrary() on shell32.dll or kernel32.dll. kernel32.dll
is always loaded. Shell32.dll is also already loaded as glib links to
functions in it. So just call GetModuleHandle() on them.

For mlang.dll in win_iconv.c and winhttp.dll in gwinhttpvfs.c, always
try loading them from a complete path, from the Windows system
directory.

Use the "tool help" API to enumerate modules in gmodule-win32.c. It is
present in all Windows versions since Windows 2000, which is all we
support anyway. Thus no need to look that API up dynamically. Just
link to it normally. We can bin the fallback code that attempts to use
the psapi API.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: