]> granicus.if.org Git - graphviz/commit
pathplan: replace unchecked allocation calls with cgraph wrappers
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 26 Dec 2022 05:41:23 +0000 (21:41 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 8 Jan 2023 20:53:25 +0000 (12:53 -0800)
commit5a0c69f09e31b2bf3145605fc4da128920f9f01f
tree35c84c3c119a1ea04250c50816487b1ed298535c
parent0d96d07af82abe6d6955513bc7ce17ff1f4b51a3
pathplan: replace unchecked allocation calls with cgraph wrappers

After the prior UB fixes, the #1999 example bottoms out in this code, failing
the second allocation call while trying to allocate ~938GB. The return values
for neither of these calls were checked, resulting in messy crashes when
scenarios like this occurred. This change swaps them for calls to the cgraph
allocation wrappers that exit gracefully on out-of-memory conditions.

Gitlab: #1999
lib/pathplan/visibility.c