mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[NEWDEV]
- Fix buffer overflow in PopulateCustomPathCombo. Powered by DPH. - Fix a signed vs unsigned comparison svn path=/trunk/; revision=65154
This commit is contained in:
@@ -280,7 +280,9 @@ PopulateCustomPathCombo(
|
||||
TRACE("RegQueryValueEx() failed with error 0x%lx\n", rc);
|
||||
goto cleanup;
|
||||
}
|
||||
Buffer[dwPathLength] = Buffer[dwPathLength + 1] = '\0';
|
||||
|
||||
Buffer[dwPathLength / sizeof(WCHAR)] = UNICODE_NULL;
|
||||
Buffer[dwPathLength / sizeof(WCHAR) + 1] = UNICODE_NULL;
|
||||
|
||||
/* Populate combo box */
|
||||
for (Path = Buffer; *Path; Path += wcslen(Path) + 1)
|
||||
@@ -305,7 +307,7 @@ SaveCustomPath(
|
||||
LPWSTR Buffer = NULL;
|
||||
LPWSTR pBuffer; /* Pointer into Buffer */
|
||||
int ItemsCount, Length;
|
||||
DWORD i;
|
||||
int i;
|
||||
DWORD TotalLength = 0;
|
||||
BOOL UseCustomPath = TRUE;
|
||||
HKEY hKey = NULL;
|
||||
|
||||
Reference in New Issue
Block a user