[tor-bugs] #33889 [Core Tor/Tor]: Functions with char* arguments are dangerous when used with casting
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Apr 13 20:48:02 UTC 2020
#33889: Functions with char* arguments are dangerous when used with casting
------------------------------------+------------------------------------
Reporter: asn | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.4.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: security memory-safety | Actual Points:
Parent ID: | Points: 3
Reviewer: | Sponsor:
------------------------------------+------------------------------------
Comment (by nickm):
I'm +1 on this general idea. I'm against using void* here though; we
should be using uint8_t or unsigned char.
If we're going to have two functions, let's have e.g. `fast_mem_is_zero()`
take the unsigned pointer, and define a `fast_mem_is_zero_char()` version
for legacy usage.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33889#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list