mirror of
https://github.com/simh/simh.git
synced 2026-01-11 23:52:58 +00:00
I1620: Properly range check character value before using as index (Coverity)
This commit is contained in:
parent
fed2f126b1
commit
d452c27c74
@ -356,7 +356,8 @@ else { /* RA */
|
||||
PAR = ADDR_A (PAR, -2); /* decr mem addr*/
|
||||
return SCPE_OK;
|
||||
}
|
||||
else if (tti_to_alp[raw] < 0) { /* illegal char? */
|
||||
else if ((raw >= sizeof(tti_to_alp)) || /* illegal char? */
|
||||
(tti_to_alp[raw] < 0)) {
|
||||
tto_write ('\a'); /* beep! */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user