Author: gedmurphy
Date: Wed Sep 23 09:27:32 2015
New Revision: 69327

URL: http://svn.reactos.org/svn/reactos?rev=69327&view=rev
Log:
[SETUPAPI]
- Buffer lengths are calculated in chars not bytes.
- Fixes use of CM_Get_Device_ID_Size / CM_Get_Device_ID

Modified:
    trunk/reactos/dll/win32/setupapi/stringtable.c

Modified: trunk/reactos/dll/win32/setupapi/stringtable.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/stringtable.c?rev=69327&r1=69326&r2=69327&view=diff
==============================================================================
--- trunk/reactos/dll/win32/setupapi/stringtable.c      [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/stringtable.c      [iso-8859-1] Wed Sep 23 
09:27:32 2015
@@ -784,7 +784,7 @@
         return FALSE;
     }
 
-    dwLength = (lstrlenW(pStringTable->pSlots[dwId - 1].pString) + 1) * 
sizeof(WCHAR);
+    dwLength = (lstrlenW(pStringTable->pSlots[dwId - 1].pString) + 1);
     if (dwLength <= *lpBufferLength)
     {
         lstrcpyW(lpBuffer, pStringTable->pSlots[dwId - 1].pString);


Reply via email to