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.
This commit is contained in:
Mark Pizzolato 2016-01-05 15:32:09 -08:00
parent 51cd9b719e
commit 6501503897

View file

@ -884,7 +884,7 @@ for (autp = auto_tab; autp->numc >= 0; autp++) { /* loop thru table */
for (k=jdis=0; k<j; k++) {
DEVICE *kdptr = find_dev (autp->dnam[k]);
if (kdptr->flags & DEV_DIS)
if ((kdptr == NULL) || (kdptr->flags & DEV_DIS))
++jdis;
}
if (autp->fixa[j-jdis]) /* fixed csr avail? */