mirror of
https://github.com/simh/simh.git
synced 2026-01-11 23:52:58 +00:00
s3: Fix out of bounds array reference and string overflow warning
This commit is contained in:
parent
4e8b24cabc
commit
b2bf1fdb17
@ -272,7 +272,7 @@ int32 printf_sym (FILE *of, char *strg, t_addr addr, uint32 *val,
|
||||
{
|
||||
int32 c1, c2, group, len1, len2, inst, aaddr, baddr;
|
||||
int32 oplen, groupno, i, j, vpos, qbyte, da, m, n;
|
||||
char bld[128], bldaddr[256], boperand[32], aoperand[32];
|
||||
char bld[128], bldaddr[160], boperand[32], aoperand[32];
|
||||
int32 blk[16], blt[16];
|
||||
int32 blkadd;
|
||||
|
||||
@ -575,7 +575,7 @@ switch (opcode[j].form) { /* Get operands based on
|
||||
if (isdigit(gbuf[0])) {
|
||||
sscanf(gbuf, "%x", &r);
|
||||
} else {
|
||||
for (i = 0; i < 16; i++) {
|
||||
for (i = 0; i < 15; i++) {
|
||||
if (strcmp(gbuf, regname[i]) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user