CID 991479 Out-of-bounds access
This commit is contained in:
@@ -482,7 +482,8 @@ Directory::CreateFile(const char* name, mode_t permissions, Node** _node)
|
||||
// prepare a directory entry for the new file
|
||||
dir_entry entry;
|
||||
|
||||
memset(entry.fName, ' ', 11);
|
||||
memset(entry.fName, ' ', sizeof(entry.fName));
|
||||
memset(entry.fExt, ' ', sizeof(entry.fExt));
|
||||
// clear both base name and extension
|
||||
memcpy(entry.fName, baseName, baseNameLength);
|
||||
if (extensionLength > 0)
|
||||
|
||||
Reference in New Issue
Block a user