Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined behavior / float-cast-overflow in speex_decode_stereo_int #27

Open
dklimkin opened this issue Jul 8, 2024 · 0 comments
Open

Comments

@dklimkin
Copy link

dklimkin commented Jul 8, 2024

speex_decode_stereo_int:276-277

      data[2*i] = (spx_int16_t)MULT16_16_P14(stereo->smooth_left, tmp);
      data[2*i+1] = (spx_int16_t)MULT16_16_P14(stereo->smooth_right, tmp);

casts float to 16 bit int which can cause an overflow and UB. This UB typically results in SIGILL with clang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant