common: fix sycc420_to_rgb buffer overflow
This commit is contained in:
parent
6a29f5a9e3
commit
b239948ad9
|
@ -367,13 +367,15 @@ static void sycc420_to_rgb(opj_image_t *img)
|
||||||
++b;
|
++b;
|
||||||
|
|
||||||
sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
|
sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
|
||||||
|
if (*y != img->comps[0].data[max])
|
||||||
++y;
|
++y;
|
||||||
++r;
|
++r;
|
||||||
++g;
|
++g;
|
||||||
++b;
|
++b;
|
||||||
++cb;
|
if (*cb != img->comps[1].data[max])
|
||||||
++cr;
|
++cb;
|
||||||
|
if (*cr != img->comps[2].data[max])
|
||||||
|
++cr;
|
||||||
}
|
}
|
||||||
if (j < maxw) {
|
if (j < maxw) {
|
||||||
sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
|
sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
|
||||||
|
|
Loading…
Reference in New Issue