From 8a5e2a62daa2d19b61e984cb4ea960a2cce12b86 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 2 Apr 2011 11:32:55 +0000 Subject: [PATCH] * fhandler_proc.cc (format_proc_partitions): Express length in WCHAR size. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_proc.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 32a569829..e6d859e49 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-04-02 Corinna Vinschen + + * fhandler_proc.cc (format_proc_partitions): Express length in WCHAR + size. + 2011-04-02 Corinna Vinschen * autoload.cc (GetExtendedTcpTable): Remove. diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index c46fbbe6f..c0821e92c 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1143,7 +1143,7 @@ format_proc_partitions (void *, char *&destbuf) restart = FALSE; /* ... and check for a "Harddisk[0-9]*" entry. */ - if (dbi->ObjectName.Length < 18 + if (dbi->ObjectName.Length < 9 * sizeof (WCHAR) || wcsncasecmp (dbi->ObjectName.Buffer, L"Harddisk", 8) != 0 || !iswdigit (dbi->ObjectName.Buffer[8])) continue;