mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[REGEDIT]
- Prevent buffer overflow when creating the display value for a value of type REG_MULTI_SZ. - Prevent processing excess data when preparing a value of type REG_MULTI_SZ for editing. svn path=/trunk/; revision=54590
This commit is contained in:
@@ -1127,7 +1127,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
|
||||
size_t llen, listlen, nl_len;
|
||||
LPTSTR src, lines = NULL;
|
||||
|
||||
if (!(stringValueData = HeapAlloc(GetProcessHeap(), 0, valueDataLen)))
|
||||
if (!(stringValueData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, valueDataLen + sizeof(TCHAR))))
|
||||
{
|
||||
error(hwnd, IDS_TOO_BIG_VALUE, valueDataLen);
|
||||
goto done;
|
||||
|
||||
@@ -186,7 +186,7 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType, void* ValB
|
||||
if(dwCount >= 2)
|
||||
{
|
||||
src = (LPTSTR)ValBuf;
|
||||
str = HeapAlloc(GetProcessHeap(), 0, dwCount);
|
||||
str = HeapAlloc(GetProcessHeap(), 0, dwCount + sizeof(TCHAR));
|
||||
if(str != NULL)
|
||||
{
|
||||
*str = _T('\0');
|
||||
|
||||
Reference in New Issue
Block a user