* We also shouldn't try to copy if the dirent is too large, obviously.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32314 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -5564,7 +5564,8 @@ fix_dirent(struct vnode* parent, struct dirent* userEntry,
|
|||||||
ASSERT(entry->d_reclen >= sizeof(struct dirent));
|
ASSERT(entry->d_reclen >= sizeof(struct dirent));
|
||||||
|
|
||||||
// This hints to a problem in the file system implementation
|
// This hints to a problem in the file system implementation
|
||||||
if (entry->d_reclen < sizeof(struct dirent))
|
if (entry->d_reclen < sizeof(struct dirent)
|
||||||
|
|| entry->d_reclen > sizeof(buffer))
|
||||||
return B_BAD_DATA;
|
return B_BAD_DATA;
|
||||||
|
|
||||||
if (user_memcpy(entry->d_name, userEntry->d_name,
|
if (user_memcpy(entry->d_name, userEntry->d_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user