mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Fix buffer overflow vulnerability (bug 1528)
svn path=/trunk/; revision=22525
This commit is contained in:
parent
1cca440e58
commit
abb09e14a3
1 changed files with 3 additions and 1 deletions
|
@ -832,7 +832,9 @@ PNP_GetClassName(handle_t BindingHandle,
|
|||
|
||||
lstrcpyW(szKeyName, L"System\\CurrentControlSet\\Control\\Class");
|
||||
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,
|
||||
szKeyName,
|
||||
|
|
Loading…
Reference in a new issue