Re: [PATCH] jffs2: Fix integer underflow in jffs2_rtime_compress

2018-12-20 Thread Richard Weinberger
Am Donnerstag, 20. Dezember 2018, 11:43:08 CET schrieb Hou Tao: > > On 2018/12/16 0:23, Richard Weinberger wrote: > > The rtime compressor assumes that at least two bytes are > > compressed. > > If we try to compress just one byte, the loop condition will > > wrap around and an out-of-bounds

Re: [PATCH] jffs2: Fix integer underflow in jffs2_rtime_compress

2018-12-20 Thread Hou Tao
On 2018/12/16 0:23, Richard Weinberger wrote: > The rtime compressor assumes that at least two bytes are > compressed. > If we try to compress just one byte, the loop condition will > wrap around and an out-of-bounds write happens. > > Cc: > Signed-off-by: Richard Weinberger > --- >

[PATCH] jffs2: Fix integer underflow in jffs2_rtime_compress

2018-12-15 Thread Richard Weinberger
The rtime compressor assumes that at least two bytes are compressed. If we try to compress just one byte, the loop condition will wrap around and an out-of-bounds write happens. Cc: Signed-off-by: Richard Weinberger --- fs/jffs2/compr_rtime.c | 3 +++ 1 file changed, 3 insertions(+) diff