mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 10:53:15 +00:00
Fix buffer overflow vulnerability (bug 1528)
svn path=/trunk/; revision=22525
This commit is contained in:
parent
1cca440e58
commit
abb09e14a3
|
@ -832,7 +832,9 @@ PNP_GetClassName(handle_t BindingHandle,
|
||||||
|
|
||||||
lstrcpyW(szKeyName, L"System\\CurrentControlSet\\Control\\Class");
|
lstrcpyW(szKeyName, L"System\\CurrentControlSet\\Control\\Class");
|
||||||
lstrcatW(szKeyName, L"\\");
|
lstrcatW(szKeyName, L"\\");
|
||||||
lstrcatW(szKeyName, ClassGuid);
|
if(lstrlenW(ClassGuid) < sizeof(szKeyName)-lstrlenW(szKeyName))
|
||||||
|
lstrcatW(szKeyName, ClassGuid);
|
||||||
|
else return CR_INVALID_DATA;
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
szKeyName,
|
szKeyName,
|
||||||
|
|
Loading…
Reference in a new issue