forked from enlightenment/efl
etc to rgba conversion - dont read stack garbage into the est imgs
surprising this wasn't caught when testing fallbacks. etc2 is used hyper-rarely but still... basically it'd skip pixels and read stack junk (which really would not crash but we'd have junk in image data). or should. found by PVS studio @fix
This commit is contained in:
parent
51cc2e0ec6
commit
02a07caca4
|
@ -315,7 +315,7 @@ _convert_etc2_rgb8_to_argb8888(void *dst, const void *src, int w, int h,
|
||||||
{
|
{
|
||||||
rg_etc2_rgb8_decode_block(in, bgra);
|
rg_etc2_rgb8_decode_block(in, bgra);
|
||||||
for (k = 0; k < 4; k++)
|
for (k = 0; k < 4; k++)
|
||||||
memcpy(out + x + k * out_step, bgra + k * 16, 16);
|
memcpy(out + x + k * out_step, bgra + (k * 4), 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ _convert_etc2_rgba8_to_argb8888(void *dst, const void *src, int w, int h,
|
||||||
{
|
{
|
||||||
rg_etc2_rgba8_decode_block(in, bgra);
|
rg_etc2_rgba8_decode_block(in, bgra);
|
||||||
for (k = 0; k < 4; k++)
|
for (k = 0; k < 4; k++)
|
||||||
memcpy(out + x + k * out_step, bgra + k * 16, 16);
|
memcpy(out + x + k * out_step, bgra + (k * 4), 16);
|
||||||
}
|
}
|
||||||
out += out_step * 4;
|
out += out_step * 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue