mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
Fix out of bounds access
when `written == buf.size()`
This commit is contained in:
parent
e8f489a4c1
commit
ea3ffee377
@ -380,7 +380,7 @@ void op_readdir(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
|
||||
std::vector<char> buf(size);
|
||||
size_t written = 0;
|
||||
|
||||
while (off < lastoff) {
|
||||
while (off < lastoff && written < size) {
|
||||
auto res = userdata->fs.readdir(*dir, off);
|
||||
assert(res);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user