Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3175 closed defect (fixed)

smartlist_string_num_isin's buffer is too short

Reported by: rransom Owned by:
Priority: Very Low Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: easy tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


smartlist_string_num_isin converts an int to a 15-character or shorter string. Its 16-byte buffer is not long enough to handle all 64-bit ints (-263 is 20 characters long, so the buffer would need to be at least 21 bytes long).

We currently only use this function for (16-bit) TCP port numbers, so this bug doesn't actually hurt anything, but we shouldn't leave an even slightly incorrect function lying around to bite us later.

Child Tickets

Change History (3)

comment:1 Changed 9 years ago by nickm

Resolution: fixed
Status: newclosed

fixed in 0.2.2 and later by 83fe07d3f26a

comment:2 Changed 8 years ago by nickm

Keywords: tor-client added

comment:3 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.