diff options
author | Mark Harris <mark.hsj@gmail.com> | 2018-05-27 17:47:28 -0700 |
---|---|---|
committer | Mark Harris <mark.hsj@gmail.com> | 2018-05-28 00:37:54 -0700 |
commit | 697beca22dcdf04ee7720218741f34a7ec0bb86d (patch) | |
tree | 03719e79d91088cae878a375cc313fb15e89fb33 /celt/mathops.c | |
parent | 287cb030ab8a59dcecbb7ab8ea689f6dd5eb38b8 (diff) | |
download | opus-697beca22dcdf04ee7720218741f34a7ec0bb86d.tar.gz |
Only call isqrt32() with a positive argument
Fixes test_opus_projection failure under ubsan, due to clz(0).
Diffstat (limited to 'celt/mathops.c')
-rw-r--r-- | celt/mathops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/celt/mathops.c b/celt/mathops.c index 78b52cc8..6ee9b9e1 100644 --- a/celt/mathops.c +++ b/celt/mathops.c @@ -38,7 +38,8 @@ #include "mathops.h" /*Compute floor(sqrt(_val)) with exact arithmetic. - This has been tested on all possible 32-bit inputs.*/ + _val must be greater than 0. + This has been tested on all possible 32-bit inputs greater than 0.*/ unsigned isqrt32(opus_uint32 _val){ unsigned b; unsigned g; |