From 2fb075ce580374c7ea01a11b7dee698e8913ef9d Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sun, 22 Dec 2019 19:58:57 -0600 Subject: [PATCH] Do not dereference and write through a null pointer during loop invariant removal. --- DAG.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DAG.pas b/DAG.pas index e3639f9..791efe2 100644 --- a/DAG.pas +++ b/DAG.pas @@ -3255,7 +3255,8 @@ var new(dp); dp^.last := nil; dp^.next := dom; - dom^.last := dp; + if dom <> nil then + dom^.last := dp; dom := dp; dp^.dfn := dfn; end; {AddDominator}