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
{
rg_etc2_rgb8_decode_block(in, bgra);
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);
}
}
{
rg_etc2_rgba8_decode_block(in, bgra);
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;
}