Do not write beyond the buffer.

svn path=/trunk/; revision=26708
This commit is contained in:
Dmitry Gorbachev 2007-05-11 23:15:53 +00:00
parent 14f97db8a4
commit acd6160248

View file

@ -763,7 +763,7 @@ CRegKeySecurity_fnConstructor(LPTSTR lpRegKey,
obj = (PCRegKeySecurity)HeapAlloc(GetProcessHeap(), obj = (PCRegKeySecurity)HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
FIELD_OFFSET(CRegKeySecurity, FIELD_OFFSET(CRegKeySecurity,
szRegKey[_tcslen(lpRegKey)])); szRegKey[_tcslen(lpRegKey)+1]));
if (obj != NULL) if (obj != NULL)
{ {
obj->ref = 1; obj->ref = 1;