1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 11:46:37 +00:00

ibmpc & Intel systems: Fix coverity identified issues

This commit is contained in:
Bill Beech
2017-04-05 12:51:28 -07:00
parent 861d460ce5
commit 2ddb7162f3
3 changed files with 11 additions and 4749 deletions

View File

@@ -1320,6 +1320,7 @@ t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32
int32 cflag, i = 0, j, r;
char gbuf[CBUFSIZE];
memset (gbuf, 0, sizeof (gbuf));
cflag = (uptr == NULL) || (uptr == &i8080_unit);
while (isspace (*cptr)) cptr++; /* absorb spaces */
if ((sw & SWMASK ('A')) || ((*cptr == '\'') && cptr++)) { /* ASCII char? */
@@ -1337,7 +1338,7 @@ t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32
or numeric (including spaces).
*/
while (1) {
while (i < sizeof (gbuf) - 4) {
if (*cptr == ',' || *cptr == '\0' ||
isdigit(*cptr))
break;

File diff suppressed because it is too large Load Diff