Fix out of bounds array reference (off by 1) when validating a maximum line number on a multiplexer
This commit is contained in:
parent
8e858341f6
commit
b36efe5226
1 changed files with 1 additions and 1 deletions
|
@ -1540,7 +1540,7 @@ while (*tptr) {
|
|||
if (0 == MATCH_CMD (gbuf, "LINE")) {
|
||||
if ((NULL == cptr) || ('\0' == *cptr))
|
||||
return SCPE_ARG;
|
||||
nextline = (int32) get_uint (cptr, 10, mp->lines, &r);
|
||||
nextline = (int32) get_uint (cptr, 10, mp->lines-1, &r);
|
||||
if ((r != SCPE_OK) || (mp->lines == 1))
|
||||
return SCPE_ARG;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue