PDP11, All VAX: fix CID: 1415538, 1415766 ("Dereference before null check")
This commit is contained in:
parent
abc1afc07e
commit
4bee16578a
1 changed files with 3 additions and 1 deletions
|
@ -839,8 +839,10 @@ if (autcon_enb == 0) /* enabled? */
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
if (name) { /* updating? */
|
if (name) { /* updating? */
|
||||||
dptr = find_dev (name);
|
dptr = find_dev (name);
|
||||||
|
if (dptr == NULL)
|
||||||
|
return SCPE_ARG;
|
||||||
dibp = (DIB *) dptr->ctxt; /* get DIB */
|
dibp = (DIB *) dptr->ctxt; /* get DIB */
|
||||||
if ((nctrl < 0) || (dptr == NULL) || (dibp == NULL))
|
if ((nctrl < 0) || (dibp == NULL))
|
||||||
return SCPE_ARG;
|
return SCPE_ARG;
|
||||||
dibp->numc = nctrl;
|
dibp->numc = nctrl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue