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>2014-05-19 15:17:59 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-05-19 15:17:59 +0400
commit9c36b394d900b0ad7e672ba3668523cab82bfc9b (patch)
tree53d3d95310c858bb3723f2fcfb58e2383825c7ab /winsup/cygwin/dtable.cc
parente928438c6b38c52844c24cae2b57c80c96c4592b (diff)
* dtable.cc (handle_to_fn): Fix length parameter in call to
QueryDosDeviceW (CID 59936).
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 2e9ee5481..0dc548c3d 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -1,7 +1,7 @@
/* dtable.cc: file descriptor support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
This file is part of Cygwin.
@@ -996,7 +996,7 @@ handle_to_fn (HANDLE h, char *posix_fn)
WCHAR fnbuf[64 * 1024];
if (wcsncasecmp (w32, DEVICE_PREFIX, DEVICE_PREFIX_LEN) != 0
- || !QueryDosDeviceW (NULL, fnbuf, sizeof (fnbuf)))
+ || !QueryDosDeviceW (NULL, fnbuf, sizeof (fnbuf) / sizeof (WCHAR)))
{
sys_wcstombs (posix_fn, NT_MAX_PATH, w32, w32len);
return false;