Skip to content

Commit b29bf71

Browse files
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: fe05155 ("jffs2: Prevent rtime decompress memory corruption") Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent feffde6 commit b29bf71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/jffs2/compr_rtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int jffs2_rtime_decompress(unsigned char *data_in,
9595

9696
positions[value]=outpos;
9797
if (repeat) {
98-
if ((outpos + repeat) >= destlen) {
98+
if ((outpos + repeat) > destlen) {
9999
return 1;
100100
}
101101
if (backoffs + repeat >= outpos) {

0 commit comments

Comments
 (0)