diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | dln.c | 8 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon Apr 16 21:25:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * dln.c (rb_w32_check_imported): skip ordinal entries. patched by + phasis68 (Heesob Park) at [ruby-core:44381]. [Bug #6303] + Mon Apr 16 18:22:14 2012 NARUSE, Yui <naruse@ruby-lang.org> * spec/default.mspec: expand relative path for ruby_exe which uses @@ -1215,9 +1215,13 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine) PIMAGE_THUNK_DATA pint = (PIMAGE_THUNK_DATA)((char *)ext + desc->Characteristics); PIMAGE_THUNK_DATA piat = (PIMAGE_THUNK_DATA)((char *)ext + desc->FirstThunk); while (piat->u1.Function) { - PIMAGE_IMPORT_BY_NAME pii = (PIMAGE_IMPORT_BY_NAME)((char *)ext + (size_t)pint->u1.AddressOfData); static const char prefix[] = "rb_"; - const char *name = (const char *)pii->Name; + PIMAGE_IMPORT_BY_NAME pii; + const char *name; + + if (IMAGE_SNAP_BY_ORDINAL(pint->u1.Ordinal)) continue; + pii = (PIMAGE_IMPORT_BY_NAME)((char *)ext + (size_t)pint->u1.AddressOfData); + name = (const char *)pii->Name; if (strncmp(name, prefix, sizeof(prefix) - 1) == 0) { FARPROC addr = GetProcAddress(mine, name); if (addr) return (FARPROC)piat->u1.Function == addr; |