[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #23583 [- Select a component]: ext/timeouts/timeout-bitops.c:234: bad shift
#23583: ext/timeouts/timeout-bitops.c:234: bad shift
--------------------------------------+--------------------
Reporter: dcb314@… | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone:
Component: - Select a component | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
--------------------------------------+--------------------
tor-0.3.1.7/src/ext/timeouts/timeout-bitops.c:234]: (error) Shifting
31-bit value by 63 bits is undefined behaviour
Source code is
for (i = 0; i <= 63; ++i) {
uint64_t x = 1 << i;
If you are going to shift something by 60+ bits reliably,
you need 1UL, not 1.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23583>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs