mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
don't count on NULL termination of returned strings
svn path=/trunk/; revision=8036
This commit is contained in:
parent
49f02ee444
commit
702870db9d
1 changed files with 3 additions and 3 deletions
|
@ -66,15 +66,15 @@ void RegDirectory::read_directory(int scan_flags)
|
|||
break;
|
||||
|
||||
w32fd.dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
|
||||
lstrcpy(w32fd.cFileName, name);
|
||||
_tcsncpy(w32fd.cFileName, name, name_len);
|
||||
|
||||
_tcscpy(pname, name);
|
||||
entry = new RegDirectory(this, buffer, _hKeyRoot);
|
||||
|
||||
memcpy(&entry->_data, &w32fd, sizeof(WIN32_FIND_DATA));
|
||||
|
||||
if (*class_name)
|
||||
entry->_type_name = _tcsdup(class_name);
|
||||
if (class_len)
|
||||
entry->_type_name = _tcsdup(String(class_name, class_len));
|
||||
|
||||
if (!first_entry)
|
||||
first_entry = entry;
|
||||
|
|
Loading…
Reference in a new issue