Opened 3 years ago

Closed 3 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: 0.2.9.3-alpha
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description


Child Tickets

Attachments (1)

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

Download all attachments as: .zip

Change History (7)

comment:1 Changed 3 years ago by mfrw

Flip the arguments in tor_calloc function call.

comment:2 Changed 3 years ago by nickm

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

comment:3 Changed 3 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 0.2.7.2-alpha (git commit 6c564e6c).

comment:4 Changed 3 years ago by nickm

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

comment:5 Changed 3 years ago by arma

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

comment:6 Changed 3 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

merged!

Note: See TracTickets for help on using tickets.