mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:33:01 +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)
|
if(hed->hBuffer)
|
||||||
{
|
{
|
||||||
while(LocalUnlock(hed->hBuffer));
|
//while(LocalUnlock(hed->hBuffer));
|
||||||
LocalFree(hed->hBuffer);
|
LocalFree(hed->hBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,7 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType, void* ValB
|
||||||
LPTSTR strBinary;
|
LPTSTR strBinary;
|
||||||
if(dwCount > 0)
|
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++)
|
for (i = 0; i < dwCount; i++)
|
||||||
{
|
{
|
||||||
wsprintf( strBinary + i*3, _T("%02X "), pData[i] );
|
wsprintf( strBinary + i*3, _T("%02X "), pData[i] );
|
||||||
|
|
|
@ -181,9 +181,9 @@ static BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
tvItem.cchTextMax = dwMaxSubKeyLen;
|
tvItem.cchTextMax = dwMaxSubKeyLen;
|
||||||
if (!(tvItem.pszText = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(TCHAR)))) {
|
/*if (!(tvItem.pszText = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(TCHAR)))) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/* Get all of the tree node siblings in one contiguous block of memory */
|
/* Get all of the tree node siblings in one contiguous block of memory */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue