From 686f560ece247fdff45feff6c6efd0520db0d4ca Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 23 Jun 2014 10:52:44 +0000 Subject: [PATCH] * dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940). --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/dll_init.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 28870e529..ab98ebc7d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2014-06-23 Corinna Vinschen + + * dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940). + 2014-06-23 Corinna Vinschen * dcrt0.cc (insert_file): Fix resource leaks (CIDs 59987, 59988). diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc index c61bbdb8c..637f1cc8e 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -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)) {