* dcrt0.cc (insert_file): Fix potential buffer overflow.

This commit is contained in:
Corinna Vinschen 2008-04-03 16:00:14 +00:00
parent 0c273f5ac3
commit 023266aac8
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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 */