diff options
author | Richard Weinberger <richard@nod.at> | 2024-12-03 12:27:15 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2024-12-05 12:31:40 +0100 |
commit | b29bf7119d6bbfd04aabb8d82b060fe2a33ef890 (patch) | |
tree | 4f05c6e8347ee75e78d339b27cfd25f3a3f842d0 | |
parent | feffde684ac29a3b7aec82d2df850fbdbdee55e4 (diff) |
jffs2: Fix rtime decompressor
The fix for a memory corruption contained a off-by-one error and
caused the compressor to fail in legit cases.
Cc: Kinsey Moore <kinsey.moore@oarcorp.com>
Cc: stable@vger.kernel.org
Fixes: fe051552f5078 ("jffs2: Prevent rtime decompress memory corruption")
Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r-- | fs/jffs2/compr_rtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c index 2b9ef713b844..3bd9d2f3bece 100644 --- a/fs/jffs2/compr_rtime.c +++ b/fs/jffs2/compr_rtime.c @@ -95,7 +95,7 @@ static int jffs2_rtime_decompress(unsigned char *data_in, positions[value]=outpos; if (repeat) { - if ((outpos + repeat) >= destlen) { + if ((outpos + repeat) > destlen) { return 1; } if (backoffs + repeat >= outpos) { |