]> Git Repo - J-linux.git/commitdiff
jffs2: Fix rtime decompressor
authorRichard Weinberger <[email protected]>
Tue, 3 Dec 2024 11:27:15 +0000 (12:27 +0100)
committerRichard Weinberger <[email protected]>
Thu, 5 Dec 2024 11:31:40 +0000 (12:31 +0100)
The fix for a memory corruption contained a off-by-one error and
caused the compressor to fail in legit cases.

Cc: Kinsey Moore <[email protected]>
Cc: [email protected]
Fixes: fe051552f5078 ("jffs2: Prevent rtime decompress memory corruption")
Signed-off-by: Richard Weinberger <[email protected]>
fs/jffs2/compr_rtime.c

index 2b9ef713b844afa71ab047c23a244b76c2bce6a1..3bd9d2f3bece203b1dd6814800d0a382ece8a416 100644 (file)
@@ -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) {
This page took 0.049237 seconds and 4 git commands to generate.