From 5a6058dfa2458c6b146fdc84934bd2c8d17eb7ea Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Fri, 15 Jul 2022 13:30:07 +1000 Subject: [PATCH] corrected region access --- fusefile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fusefile.c b/fusefile.c index 476ca9d..8e09b58 100644 --- a/fusefile.c +++ b/fusefile.c @@ -269,8 +269,8 @@ static int write_block(off_t off,const char *buf,size_t size) { return -EIO; // past EOF } struct Source *source = &sources.array[ index ]; - off_t from = off - source->start; - off_t max = source->to - source->from - from; + off_t from = off - source->start + source->from; + off_t max = source->to - from; if ( lseek( source->fd, from, SEEK_SET ) < 0 ) { return -EIO; } -- 2.39.2