summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-16 12:26:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-16 12:26:30 +0000
commit1ca2a6d7293ce98ab0f248697d161f0e3f74507e (patch)
tree63a0b175cee0700a6bd28fa51d2d92581eb6e646 /dln.c
parentec9ccb527cadf71e5ebfe988cf80c7e57da3827e (diff)
merge revision(s) 35352:
* dln.c (rb_w32_check_imported): skip ordinal entries. patched by phasis68 (Heesob Park) at [ruby-core:44381]. [Bug #6303] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dln.c b/dln.c
index 961592d7b0..a6e4891ba5 100644
--- a/dln.c
+++ b/dln.c
@@ -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;