mirror of
https://github.com/open-simh/simh.git
synced 2026-01-19 17:47:54 +00:00
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
@ -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…
x
Reference in New Issue
Block a user