diff --git a/fusee/fusee-secondary/src/fs_dev.c b/fusee/fusee-secondary/src/fs_dev.c index 79f8a69..dc566f4 100644 --- a/fusee/fusee-secondary/src/fs_dev.c +++ b/fusee/fusee-secondary/src/fs_dev.c @@ -385,7 +385,7 @@ return -1; } - if(pos < 0 && off < -pos) { + if(pos < 0 && pos + off < 0) { /* don't allow seek to before the beginning of the file */ r->_errno = EINVAL; return -1;