aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-06-23 10:52:44 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-06-23 10:52:44 +0000
commit686f560ece247fdff45feff6c6efd0520db0d4ca (patch)
tree7e6196bacb86b0671225021ec24b71bd3032fec9 /winsup
parenta1fd4b1a03d6f0af38fd1e1d9cc250f446bb0483 (diff)
downloadnewlib-686f560ece247fdff45feff6c6efd0520db0d4ca.zip
newlib-686f560ece247fdff45feff6c6efd0520db0d4ca.tar.gz
newlib-686f560ece247fdff45feff6c6efd0520db0d4ca.tar.bz2
* dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940).
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/dll_init.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 28870e5..ab98ebc 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
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).
2014-06-23 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
index c61bbdb..637f1cc 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))
{