Opened 5 months ago

Last modified 5 months ago

#34232 new defect

Make summarize_protover_flags() handle NULL and empty string the same

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt, protover, 044-deferred
Cc: Actual Points:
Parent ID: Points: 0.5
Reviewer: Sponsor:

Description

summarize_protover_flags(NULL, NULL) doesn't set protocols_known, but summarize_protover_flags("", "") does.

While this situation probably won't happen in practice, it could be a source of subtle bugs.

And we have a general guideline that functions should treat NULL and "" in similar ways. (Or the difference should be clearly documented.)

So we should ignore "" protovers, the same way we ignore NULL protovers. (Relays with empty protovers won't end up in the consensus, and clients can't use them for anything. So this change should have no real impact.)

Child Tickets

Change History (2)

comment:1 Changed 5 months ago by nickm

Milestone: Tor: unspecifiedTor: 0.4.4.x-final

comment:2 Changed 5 months ago by nickm

Keywords: 044-deferred added
Milestone: Tor: 0.4.4.x-finalTor: unspecified

Bulk-remove tickets from 0.4.4. Add the 044-deferred label to them.

Note: See TracTickets for help on using tickets.