pl_mpeg
pl_mpeg copied to clipboard
UBSan Triggered
At line 3178:
else if (motion < ((-fscale) << 4)) {
And at line 3366:
level <<= 1;
When using -fsanitize=undefined
.
Changing these to else if (motion < (-(fscale << 4))) {
and level = (int)((unsigned int)level << 1);
seems to work and doesn't present any issues as far as I can tell.