diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-03 16:00:14 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-03 16:00:14 +0000 |
commit | 023266aac8324a2611361d6b927ac9ef878ef311 (patch) | |
tree | 5eda4d5470c184ad5643f0c803a90e4e83d8df39 /winsup | |
parent | 0c273f5ac39d68344a5ea988c40e2af271b6f39a (diff) | |
download | newlib-023266aac8324a2611361d6b927ac9ef878ef311.zip newlib-023266aac8324a2611361d6b927ac9ef878ef311.tar.gz newlib-023266aac8324a2611361d6b927ac9ef878ef311.tar.bz2 |
* dcrt0.cc (insert_file): Fix potential buffer overflow.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3d788d0..05ca046 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2008-04-03 Corinna Vinschen <corinna@vinschen.de> + * dcrt0.cc (insert_file): Fix potential buffer overflow. + +2008-04-03 Corinna Vinschen <corinna@vinschen.de> + * path.cc (mount_info::from_fstab): Get module path name of the Cygwin DLL, not the path of the application. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index cd2ac1e..5464cce 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -165,7 +165,7 @@ insert_file (char *name, char *&cmd) tmp_pathbuf tp; PWCHAR wname = tp.w_get (); - sys_mbstowcs (wname, NT_MAX_PATH + 1, name + 1); + sys_mbstowcs (wname, NT_MAX_PATH, name + 1); f = CreateFileW (wname, GENERIC_READ, /* open for reading */ FILE_SHARE_READ, /* share for reading */ |