mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
fixed buffer overflow
removed useless LocalUnlock fixed memory leak svn path=/trunk/; revision=18521
This commit is contained in:
parent
643679edee
commit
7d087d74d1
3 changed files with 4 additions and 4 deletions
|
@ -517,7 +517,7 @@ HEXEDIT_WM_NCDESTROY(PHEXEDIT_DATA hed)
|
|||
{
|
||||
if(hed->hBuffer)
|
||||
{
|
||||
while(LocalUnlock(hed->hBuffer));
|
||||
//while(LocalUnlock(hed->hBuffer));
|
||||
LocalFree(hed->hBuffer);
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType, void* ValB
|
|||
LPTSTR strBinary;
|
||||
if(dwCount > 0)
|
||||
{
|
||||
strBinary = HeapAlloc(GetProcessHeap(), 0, (dwCount * sizeof(TCHAR) * 3) + 1);
|
||||
strBinary = HeapAlloc(GetProcessHeap(), 0, (dwCount * sizeof(TCHAR) * 3) + sizeof(TCHAR));
|
||||
for (i = 0; i < dwCount; i++)
|
||||
{
|
||||
wsprintf( strBinary + i*3, _T("%02X "), pData[i] );
|
||||
|
|
|
@ -181,9 +181,9 @@ static BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem)
|
|||
goto done;
|
||||
}
|
||||
tvItem.cchTextMax = dwMaxSubKeyLen;
|
||||
if (!(tvItem.pszText = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(TCHAR)))) {
|
||||
/*if (!(tvItem.pszText = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(TCHAR)))) {
|
||||
goto done;
|
||||
}
|
||||
}*/
|
||||
|
||||
/* Get all of the tree node siblings in one contiguous block of memory */
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue