mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 00:32:00 +00:00
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: fe051552f5
("jffs2: Prevent rtime decompress memory corruption")
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
feffde684a
commit
b29bf7119d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user