* fhandler_proc.cc (format_proc_partitions): Express length in WCHAR

size.
This commit is contained in:
Corinna Vinschen 2011-04-02 11:32:55 +00:00
parent bb8216a114
commit 8a5e2a62da
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-04-02 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_partitions): Express length in WCHAR
size.
2011-04-02 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (GetExtendedTcpTable): Remove.

View File

@ -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;