Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #12855

Closed (moved)
(moved)
Open
Created Aug 13, 2014 by Nick Mathewson@nickm🍬

Use calloc and reallocarray instead of malloc(a*b), malloc_zero(a*b), or realloc(p,a*b)

It's stupid and error-prone to multiply-then-malloc: you're just begging for an integer overflow. We should add a reallocarray (like OpenBSD uses) and use spatch/coccinelle to replace all our bad allocations.

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