mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 19:09:27 +00:00
Check module name length in ModuleNext().
This commit is contained in:
parent
1afd5a25f0
commit
c4137d510a
|
@ -1098,8 +1098,8 @@ BOOL16 WINAPI ModuleNext( MODULEENTRY *lpme )
|
|||
if (!lpme->wNext) return FALSE;
|
||||
if (!(pModule = NE_GetPtr( lpme->wNext ))) return FALSE;
|
||||
name = (char *)pModule + pModule->name_table;
|
||||
memcpy( lpme->szModule, name + 1, *name );
|
||||
lpme->szModule[(BYTE)*name] = '\0';
|
||||
memcpy( lpme->szModule, name + 1, min(*name, MAX_MODULE_NAME) );
|
||||
lpme->szModule[min(*name, MAX_MODULE_NAME)] = '\0';
|
||||
lpme->hModule = lpme->wNext;
|
||||
lpme->wcUsage = pModule->count;
|
||||
strncpy( lpme->szExePath, NE_MODULE_NAME(pModule), MAX_PATH );
|
||||
|
|
Loading…
Reference in a new issue