summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_proc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_proc.cc')
-rw-r--r--winsup/cygwin/fhandler_proc.cc2
1 files changed, 1 insertions, 1 deletions
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;