* dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940).

This commit is contained in:
Corinna Vinschen 2014-06-23 10:52:44 +00:00
parent a1fd4b1a03
commit 686f560ece
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2014-06-23 Corinna Vinschen <corinna@vinschen.de>
* dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940).
2014-06-23 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (insert_file): Fix resource leaks (CIDs 59987, 59988).

View File

@ -179,7 +179,7 @@ dll *
dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
{
WCHAR buf[NT_MAX_PATH];
GetModuleFileNameW (h, buf, sizeof (buf));
GetModuleFileNameW (h, buf, NT_MAX_PATH);
PWCHAR name = buf;
if (!wcsncmp (name, L"\\\\?\\", 4))
{