mirror of
https://github.com/simh/simh.git
synced 2026-01-25 11:46:37 +00:00
All: Declare sim_stop_messages as an array SCPE_BASE long
This avoids a potential invalid pointer dereference when formatting the return value from sim_instr() if it is < SCPE_BASE but greater than the previously defined static array size.sizeof Update simh.doc to reflect this generic change.
This commit is contained in:
@@ -90,7 +90,7 @@ DEVICE *sim_devices[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *sim_stop_messages[] = {
|
||||
const char *sim_stop_messages[SCPE_BASE] = {
|
||||
"Unknown error",
|
||||
"Reserved instruction",
|
||||
"HALT instruction",
|
||||
|
||||
Reference in New Issue
Block a user