Hardened the checking of directory offset requested by a readdir
When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.pull/40/head
parent
7f81935f32
commit
fb28eef6f1
|
@ -2223,7 +2223,7 @@ static void fuse_lib_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
|
|||
}
|
||||
}
|
||||
if (dh->filled) {
|
||||
if (off < dh->len) {
|
||||
if ((off >= 0) && (off < dh->len)) {
|
||||
if (off + size > dh->len)
|
||||
size = dh->len - off;
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue