mirror of
https://github.com/simh/simh.git
synced 2026-02-27 09:09:46 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user