Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22177 closed defect (fixed)

CID 1405875 dead code in test_options_validate_impl()

Reported by: ahf Owned by: catalyst
Priority: Medium Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: catalyst Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by catalyst)

Coverity found some dead code in CID 1405875, which we should fix. The dead code is to handle an error condition in config_get_lines(), which we weren't testing. The short-term fix is to remove the offending code, and a longer-term fix is to actually test the relevant error conditions so that the dead code would execute.

Child Tickets

Change History (8)

comment:1 Changed 2 years ago by ahf

Status: newneeds_review

Patch in https://gitlab.com/ahf/tor/merge_requests/9/commits

Let's keep this ticket opened after landing this. Catalyst suggested adding a test for the error path in this code.

comment:2 Changed 2 years ago by dgoulet

Status: needs_reviewmerge_ready

lgtm;

comment:3 Changed 2 years ago by nickm

Owner: set to ahf
Status: merge_readyassigned

Merged; making ticket assigned again.

comment:4 Changed 2 years ago by catalyst

Cc: catalyst added

comment:5 Changed 2 years ago by catalyst

Owner: changed from ahf to catalyst

comment:6 Changed 2 years ago by catalyst

Status: assignedneeds_review

Proposed patch in https://gitlab.com/argonblue/tor/merge_requests/11
Should we also update the ticket summary and description?

comment:7 Changed 2 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks fine; tests pass. Merged! Feel free to edit ticket as you see fit.

comment:8 Changed 2 years ago by catalyst

Description: modified (diff)
Summary: Remove dead code in test_options_validate_impl()CID 1405875 dead code in test_options_validate_impl()

Updated description.

Note: See TracTickets for help on using tickets.