ntdll: Allow module with extensions in forward specifications.

This commit is contained in:
Alexandre Julliard 2006-12-04 13:37:32 +01:00
parent 08d1398d97
commit 84fb1e1f3f
1 changed files with 8 additions and 3 deletions

View File

@ -328,13 +328,18 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward )
DWORD exp_size;
WINE_MODREF *wm;
WCHAR mod_name[32];
const char *end = strchr(forward, '.');
const char *end = strrchr(forward, '.');
FARPROC proc = NULL;
if (!end) return NULL;
if ((end - forward) * sizeof(WCHAR) >= sizeof(mod_name) - sizeof(dllW)) return NULL;
if ((end - forward) * sizeof(WCHAR) >= sizeof(mod_name)) return NULL;
ascii_to_unicode( mod_name, forward, end - forward );
memcpy( mod_name + (end - forward), dllW, sizeof(dllW) );
mod_name[end - forward] = 0;
if (!strchrW( mod_name, '.' ))
{
if ((end - forward) * sizeof(WCHAR) >= sizeof(mod_name) - sizeof(dllW)) return NULL;
memcpy( mod_name + (end - forward), dllW, sizeof(dllW) );
}
if (!(wm = find_basename_module( mod_name )))
{