[ros-diffs] [greatlrd] 26715: did see a small mistake use sizeof(TCHAR) for adding NULL termeting of string for u do not known if we switch compile regedit as unicode-16 or ANSI.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sat May 12 10:27:00 CEST 2007


Author: greatlrd
Date: Sat May 12 12:27:00 2007
New Revision: 26715

URL: http://svn.reactos.org/svn/reactos?rev=26715&view=rev
Log:
did see a small mistake use sizeof(TCHAR) for adding NULL termeting of string for u do not known if we switch compile regedit as unicode-16 or ANSI. 

Modified:
    trunk/reactos/base/applications/regedit/security.c

Modified: trunk/reactos/base/applications/regedit/security.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/security.c?rev=26715&r1=26714&r2=26715&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/security.c (original)
+++ trunk/reactos/base/applications/regedit/security.c Sat May 12 12:27:00 2007
@@ -763,7 +763,7 @@
     obj = (PCRegKeySecurity)HeapAlloc(GetProcessHeap(),
                                       HEAP_ZERO_MEMORY,
                                       FIELD_OFFSET(CRegKeySecurity,
-                                                   szRegKey[_tcslen(lpRegKey)+1]));
+                                                   szRegKey[_tcslen(lpRegKey) + sizeof(TCHAR)]));
     if (obj != NULL)
     {
         obj->ref = 1;




More information about the Ros-diffs mailing list