From 80f8e1b66caa645cedaae25a5ad6502047e91d35 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Wed, 1 Jun 2011 09:59:54 +0000 Subject: [PATCH] [NTOS] - Fix bug in PnpRegSzToString. The caller expects the result length to be the length of the string in bytes, not the string length - Introduced in rev 46690 svn path=/trunk/; revision=52037 --- reactos/ntoskrnl/io/pnpmgr/pnputil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnputil.c b/reactos/ntoskrnl/io/pnpmgr/pnputil.c index f274f3db679..9bbccaca5ee 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnputil.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnputil.c @@ -178,7 +178,7 @@ PnpRegSzToString(IN PWCHAR RegSzData, for (p = RegSzData; p < pp; p++) if (!*p) break; /* Return it */ - if (StringLength) *StringLength = p - RegSzData; + if (StringLength) *StringLength = (p - RegSzData) * sizeof(WCHAR); return TRUE; }