From ca19ac921c0e7c135c8cf924cad5ee09e91f67e4 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 14 Mar 2017 10:24:18 -0700 Subject: [PATCH] SCP: Fix potential NULL pointer dereference (COVERITY) --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index 7d65626c..8aeb5a63 100644 --- a/scp.c +++ b/scp.c @@ -3544,7 +3544,7 @@ else { result = test_search (&val, &sim_stabr); /* test condition */ } else { /* Handle memory case */ - if (!get_asearch (gbuf, sim_dfdev->dradix, &sim_staba) || /* parse condition */ + if (!get_asearch (gbuf, sim_dfdev ? sim_dfdev->dradix : sim_dflt_dev->dradix, &sim_staba) || /* parse condition */ (sim_staba.boolop == -1)) /* relational op reqd */ return SCPE_MISVAL; reason = get_aval (addr, sim_dfdev, sim_dfunit);/* get data */