[tor-bugs] #23643 [Core Tor/Tor]: Type-check struct members that are passed to confparse
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Sep 25 19:32:06 UTC 2017
#23643: Type-check struct members that are passed to confparse
--------------------------+------------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status: needs_revision
Priority: Medium | Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: catalyst | Sponsor:
--------------------------+------------------------------------
Comment (by catalyst):
Suggestions:
* Instead of using a null pointer, use the address of a static object of
the appropriate type. We presumably don't care too much about the extra
memory footprint if we're building test code.
* Use an equality operator instead of pointer subtraction. The equality
operators (with both operands being pointers) have the same constraints
about type compatibility as subtraction, but don't have the requirement
that both pointers point to members of the same array.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23643#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list