[tor-bugs] #32060 [- Select a component]: CID 1454761: wrong type passed to unlock_cb_buf()?
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Oct 14 13:26:46 UTC 2019
#32060: CID 1454761: wrong type passed to unlock_cb_buf()?
--------------------------------------+----------------------------------
Reporter: teor | Owner: teor
Type: defect | Status: assigned
Priority: Medium | Milestone: Tor: 0.4.2.x-final
Component: - Select a component | Version: Tor: 0.4.2.2-alpha
Severity: Normal | Keywords: 042-must, regression
Actual Points: | Parent ID:
Points: 0.1 | Reviewer:
Sponsor: |
--------------------------------------+----------------------------------
Maybe it should be `void *cb_buf[]`
{{{
CID 1454761: Incorrect expression (SIZEOF_MISMATCH)
/src/lib/err/backtrace.c: 107 in unlock_cb_buf()
101 }
102
103 /** Unlock the static stack pointer buffer. */
104 static void
105 unlock_cb_buf(void *cb_buf)
106 {
CID 1454761: Incorrect expression (SIZEOF_MISMATCH)
Passing argument "cb_buf" of type "void *" and argument "2048UL /* 256
* sizeof (void *) */" to function "memset" is suspicious.
107 memset(cb_buf, 0, SIZEOF_CB_BUF);
108 pthread_mutex_unlock(&cb_buf_mutex);
109 }
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32060>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list