[ros-diffs] [janderwald] 52037: [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

janderwald at svn.reactos.org janderwald at svn.reactos.org
Wed Jun 1 09:59:54 UTC 2011


Author: janderwald
Date: Wed Jun  1 09:59:54 2011
New Revision: 52037

URL: http://svn.reactos.org/svn/reactos?rev=52037&view=rev
Log:
[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

Modified:
    trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c

Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c?rev=52037&r1=52036&r2=52037&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c [iso-8859-1] Wed Jun  1 09:59:54 2011
@@ -178,7 +178,7 @@
     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;
 }
 




More information about the Ros-diffs mailing list