Skip to content

Commit

Permalink
LIB: math: fix UB caused by possible signed integer overflow
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Westerfeld <[email protected]>
  • Loading branch information
swesterfeld committed Jun 16, 2024
1 parent 5caf54a commit 44417f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/smmath.hh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ internal_fast_vector_sin (const VectorSinParams& params, Iterator begin, Iterato
const double phase_inc = params.freq / params.mix_freq * 2 * M_PI;
const double inc_re = cos (phase_inc);
const double inc_im = sin (phase_inc);
int n = 0;
uint n = 0;

double state_re;
double state_im;
Expand Down

0 comments on commit 44417f2

Please sign in to comment.