Skip to content
  • Magnus Jacobsson's avatar
    twopigen: layout: fix heap-buffer-overflow by storing dimension in root graph · 434ff46f
    Magnus Jacobsson authored
    The layout allocates memory based on the dimension of the root graph,
    but since the dimension was stored in the subgraph and the dimension
    in the root graph defaulted to zero, too little memory was allocated.
    
    An alternative solution would have been to use the dimension of the
    subgraph, but this had other implications and the chosen solution is
    the same as what the other two layout engines supporting the dim
    attribute (neato and sfdp) use. Twopi always uses two dimensions.
    
    This fixes the last memory issue detected by ASan in the
    test_subgraph_layout test, which now runs without failures.
    434ff46f
To find the state of this project's repository at the time of any of these versions, check out the tags.