[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 18:59: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:
--------------------------+------------------------------------
Changes (by catalyst):

 * status:  needs_review => needs_revision
 * reviewer:   => catalyst


Comment:

 This is a nifty idea.

 I'm trying to analyze the standards conformance aspects of it.  Doing
 pointer arithmetic on a null pointer isn't a great idea (and probably non-
 conforming; `offsetof()` is allowed to do that because it's part of the
 implementation).  Also pointer subtraction has to be between members of
 the same array (or a fictitious member one past the end), so subtracting a
 pointer to a member from a pointer to a member of an included structure
 doesn't work.

 I think it can be salvaged in a standards-conforming way, but I'll have to
 think about it a bit.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23643#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list