diff options
author | Bruno Haible <bruno@clisp.org> | 2023-11-02 16:19:44 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-12-19 15:12:38 -0300 |
commit | d0829302728954e0abacfc01551c17daf4d61c87 (patch) | |
tree | 931ddfa8eee1f5bf55078f807d287773bdb9febe /stdlib/strtoul.c | |
parent | 80a40a9e14d9a01e3f70c5b37ecd1da83033b6de (diff) | |
download | glibc-d0829302728954e0abacfc01551c17daf4d61c87.tar.gz glibc-d0829302728954e0abacfc01551c17daf4d61c87.tar.xz glibc-d0829302728954e0abacfc01551c17daf4d61c87.zip |
hppa: Fix undefined behaviour in feclearexcept (BZ 30983)
The expression (excepts & FE_ALL_EXCEPT) << 27 produces a signed integer overflow when 'excepts' is specified as FE_INVALID (= 0x10), because - excepts is of type 'int', - FE_ALL_EXCEPT is of type 'int', - thus (excepts & FE_ALL_EXCEPT) is (int) 0x10, - 'int' is 32 bits wide. The patched code produces the same instruction sequence as previosuly. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'stdlib/strtoul.c')
0 files changed, 0 insertions, 0 deletions