Ticket #3124: patch.3.vfs.diff

File patch.3.vfs.diff, 578 bytes (added by Adek336, 11 years ago)
  • src/system/kernel/fs/vfs.cpp

     
    54705470            return B_BAD_ADDRESS;
    54715471
    54725472        ASSERT(entry->d_reclen >= sizeof(struct dirent));
     5473        ASSERT(entry->d_reclen <= sizeof(buffer));
    54735474
    54745475        if (user_memcpy(entry->d_name, userEntry->d_name,
    5475                 entry->d_reclen - sizeof(struct dirent)) != B_OK)
     5476                entry->d_reclen - sizeof(struct dirent) + 1) != B_OK)
    54765477            return B_BAD_ADDRESS;
    54775478    } else
    54785479        entry = userEntry;