Fix a string length calculation bug in StringTableDuplicate.
authorEric Kohl <eric.kohl@reactos.org>
Sat, 9 Jul 2005 15:22:07 +0000 (15:22 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sat, 9 Jul 2005 15:22:07 +0000 (15:22 +0000)
svn path=/trunk/; revision=16524

reactos/lib/setupapi/stringtable.c

index 827cdc6..52f7fb6 100644 (file)
@@ -276,7 +276,7 @@ StringTableDuplicate(HSTRING_TABLE hStringTable)
     {
         if (pSourceTable->pSlots[i] != NULL)
         {
-            length = lstrlenW((pSourceTable->pSlots[i]) + 1) * sizeof(WCHAR);
+            length = (lstrlenW(pSourceTable->pSlots[i]) + 1) * sizeof(WCHAR);
             pDestinationTable->pSlots[i] = MyMalloc(length);
             if (pDestinationTable->pSlots[i] != NULL)
             {