Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 325
    • Issues 325
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #662
Closed
Open
Issue created Apr 17, 2008 by Trac@tracbot

wrong size for allocation

[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]

Trac:
Username: aakova

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking