Opened 4 years ago

Closed 4 years ago

#20288 closed defect (fixed)

Use correct arguments to tor_calloc

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


Child Tickets

Attachments (1)

0001-dircollate-Use-correct-tor_calloc-args.patch (968 bytes) - added by mfrw 4 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by mfrw

Flip the arguments in tor_calloc function call.

comment:2 Changed 4 years ago by nickm

Milestone: Tor: 0.2.9.x-final
Status: newneeds_review

comment:3 Changed 4 years ago by arma

Jeez. Well, the patch looks smart to apply.

Did this code just never get called? It looks like the offending line went into Tor (git commit 6c564e6c).

comment:4 Changed 4 years ago by nickm

arma: it's perfectly _safe_ to call calloc with the arguments reversed; it's just bad style.

comment:5 Changed 4 years ago by arma

Ah ha, because it just multiplies the two arguments together anyway? Ok, great.

comment:6 Changed 4 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed


Note: See TracTickets for help on using tickets.