]> granicus.if.org Git - graphviz/commit
Fixed: 'dereference before null check' in DotIO.c
authorErwin Janssen <erwinjanssen@outlook.com>
Sat, 19 Nov 2016 01:20:46 +0000 (02:20 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Wed, 7 Dec 2016 13:52:40 +0000 (14:52 +0100)
commit5236d9d5009e78aa38c02a98a59e821b36ae9037
tree15f5020bbede320768fc07cb747e7f1398057a84
parent0853d73b46f525d5ee78daad4ebc7de966ff3ed5
Fixed: 'dereference before null check' in DotIO.c

When the local variables in the function `convert_edge_labels_to_nodes` in
lib/spare/DotIO.c are initialized, the pointer `g` is dereferenced. But a
the check that tests if `g` is NULL happens after this initialization. The
fix is placing the `if (!g) return NULL` as the first line of the
function, so dereferencing only occurs if the pointer is not NULL.
lib/sparse/DotIO.c