mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 18:45:00 +00:00
Allocate enough memory for Value (problem was spotted by Pigglesworth)
This problem was revealed by r36797 (thanks to aicom, elhoir, Lone_Rifle and vicmarcal for the help with regression testing) Fixes ipconfig, ping and other network apps crashing with a buffer overflow. svn path=/trunk/; revision=36816
This commit is contained in:
parent
eb2c5f864c
commit
c9a04929cc
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ PWCHAR GetNthChildKeyName( HANDLE RegHandle, DWORD n ) {
|
|||
}
|
||||
|
||||
ValueLen = MaxAdapterName;
|
||||
Value = (PWCHAR)HeapAlloc( GetProcessHeap(), 0, MaxAdapterName );
|
||||
Value = (PWCHAR)HeapAlloc( GetProcessHeap(), 0, MaxAdapterName * sizeof(WCHAR) );
|
||||
Status = RegEnumKeyExW( RegHandle, n, Value, &ValueLen,
|
||||
NULL, NULL, NULL, NULL );
|
||||
if (Status != ERROR_SUCCESS)
|
||||
|
|
Loading…
Reference in a new issue