Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-04-03 20:00:14 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-03 20:00:14 +0400
commit023266aac8324a2611361d6b927ac9ef878ef311 (patch)
tree5eda4d5470c184ad5643f0c803a90e4e83d8df39 /winsup/cygwin/dcrt0.cc
parent0c273f5ac39d68344a5ea988c40e2af271b6f39a (diff)
* dcrt0.cc (insert_file): Fix potential buffer overflow.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index cd2ac1eae..5464cce57 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 */