commit | 0d49e47978d5f2d0b108b0ddc65943763e88f729 | [log] [tgz] |
---|---|---|
author | William A. Kennington III <wak@google.com> | Mon Apr 08 20:27:26 2019 -0700 |
committer | William A. Kennington III <wak@google.com> | Thu Apr 11 18:40:25 2019 -0700 |
tree | 73aaa9c1141a2e7425e92cb0ff660e0afcf7331e | |
parent | 11df4f6906edc0dfb23089a6e297158549c19ebd [diff] |
message/unpack: Fix undefined behavior It's UB to shift an integer by the size of that integer. More specifically, if you disable compiler optimization and try and unpack a 32 bit bitset you will end up with a 0x0 mask. Avoid UB by replacing shift subtract with a negate shift. Tested: Unit tests pass now. Change-Id: I03a6f866a51c955b57787d641da9180841747e4c Signed-off-by: William A. Kennington III <wak@google.com>
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To clean the repository run ./bootstrap.sh clean
.