Opened 3 years ago

Closed 3 years ago

#19462 closed enhancement (implemented)

base*_encode/decode functions should clear any unused portion of their target buffer.

Reported by: nickm Owned by: dgoulet
Priority: High Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: review-group-4
Cc: Actual Points:
Parent ID: Points: .1
Reviewer: Sponsor: SponsorU-can

Description

For safety, it's not great to leave uninitialized data in a buffer.

Occasionally, this would pose a performance cost. But I maintain that mostly it won't, and we can improve the callsites where it would.

Child Tickets

Change History (4)

comment:1 Changed 3 years ago by nickm

Keywords: 029-proposed removed
Milestone: Tor: 0.2.9.x-final
Owner: set to dgoulet
Priority: MediumHigh
Status: newassigned

comment:2 Changed 3 years ago by dgoulet

Status: assignedmerge_ready

Simple memset(0) in each base*_encode/decode function.

See branch: bug19462_029_01

comment:3 Changed 3 years ago by nickm

Keywords: review-group-4 added

comment:4 Changed 3 years ago by nickm

Resolution: implemented
Status: merge_readyclosed

lgtm; merged!

Note: See TracTickets for help on using tickets.