From 650150389770a309b31953f2c8c02f3e0f24f65b Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 5 Jan 2016 15:32:09 -0800 Subject: [PATCH] PDP11, VAX: Fix potential NULL pointer dereference in autoconfigure. No existing simulators have device combinations that would expose this. It is merely the right thing to do. --- PDP11/pdp11_io_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PDP11/pdp11_io_lib.c b/PDP11/pdp11_io_lib.c index 5f53f188..98d444d1 100644 --- a/PDP11/pdp11_io_lib.c +++ b/PDP11/pdp11_io_lib.c @@ -884,7 +884,7 @@ for (autp = auto_tab; autp->numc >= 0; autp++) { /* loop thru table */ for (k=jdis=0; kdnam[k]); - if (kdptr->flags & DEV_DIS) + if ((kdptr == NULL) || (kdptr->flags & DEV_DIS)) ++jdis; } if (autp->fixa[j-jdis]) /* fixed csr avail? */