s3: Fix out of bounds array reference and string overflow warning
This commit is contained in:
parent
39d33c4cc9
commit
3bba1bbe14
1 changed files with 2 additions and 2 deletions
|
@ -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[96], 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…
Add table
Reference in a new issue