Opened 13 years ago

Last modified 8 years ago

#662 closed defect (Fixed)

wrong size for allocation

Reported by: aakova Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: aakova Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


[tor/src/or/dirvote.c:networkstatus_compute_consensus: ~644]

int *named_flag; /* Index of the flag "Named" for votes[j] */
int *unnamed_flag; /* Index of the flag "Unnamed" for votes[j] */


named_flag = tor_malloc_zero(sizeof(int*) * smartlist_len(votes));


[ This looks wrong, probably we should be using 'sizeof(int)' in the allocation. Probably only affects 64-bit systems. ]

[ Same problem on the next line too: ]

unnamed_flag = tor_malloc_zero(sizeof(int*) * smartlist_len(votes));

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (3)

comment:1 Changed 13 years ago by nickm

Thanks! This should be fixed in r14391 (trunk) and r14391 (1.4 branch).

comment:2 Changed 13 years ago by nickm

flyspray2trac: bug closed.

comment:3 Changed 8 years ago by nickm

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