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
}
ValueLen = MaxAdapterName;
}
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)
Status = RegEnumKeyExW( RegHandle, n, Value, &ValueLen,
NULL, NULL, NULL, NULL );
if (Status != ERROR_SUCCESS)