Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
theora
theora
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Xiph.Org
  • theoratheora
  • Issues
  • #1611

Closed
Open
Opened Oct 19, 2009 by Gitlab Bot@GitlabBotDeveloper

theora bug report

This line:

'''storage=(char *)_ogg_calloc(1,size);'''

at following code snippet, has memory leak. (huffdec.c) pls check.

/Unpacks a set of Huffman trees, and reduces them to a collapsed representation. _opb: The buffer to unpack the trees from. _nodes: The table to fill with the Huffman trees. Return: 0 on success, or a negative value on error./ int oc_huff_trees_unpack(oc_pack_buf *_opb, oc_huff_node *_nodes[TH_NHUFFMAN_TABLES]){ int i; for(i=0;i<TH_NHUFFMAN_TABLES;i++){ oc_huff_node nodes[511]; char *storage; size_t size; int ret; /Unpack the full tree into a temporary buffer./ ret=oc_huff_tree_unpack(_opb,nodes,sizeof(nodes)/sizeof(*nodes)); if(ret<0)return ret; /Figure out how big the collapsed tree will be./ size=oc_huff_tree_collapse_size(nodes,0); storage=(char *)_ogg_calloc(1,size); if(storage==NULL)return TH_EFAULT; /And collapse it./ _nodes[i]=oc_huff_tree_collapse(nodes,&storage); } return 0; }

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xiph/theora#1611