Re: [PATCH] media: intel-ipu3: cio2: fixup off-by-one bug in cio2_vb2_buf_init

2018-01-19 Thread Sakari Ailus
Hi Yong, Thanks for the patch. On Fri, Jan 19, 2018 at 12:27:34AM -0600, Yong Zhi wrote: > With "pages" initialized to vb length + 1 pages, the condition > check if(!pages--) will break at one more page than intended, > this can result in out-of-bound access to b->lop[i][j] when setting > the las

[PATCH] media: intel-ipu3: cio2: fixup off-by-one bug in cio2_vb2_buf_init

2018-01-18 Thread Yong Zhi
With "pages" initialized to vb length + 1 pages, the condition check if(!pages--) will break at one more page than intended, this can result in out-of-bound access to b->lop[i][j] when setting the last dummy page. Fix: commit c7cbef1fdb54 ("media: intel-ipu3: cio2: fix a crash with out-of-bounds