SCP: Fix Coverity identified issues

This commit is contained in:
Mark Pizzolato 2021-04-11 15:48:01 -07:00
parent 96c32fcb80
commit c004fcc2ba
2 changed files with 2 additions and 1 deletions

2
scp.c
View file

@ -15730,7 +15730,7 @@ while (t->function_name) {
if (*remainder != '\0')
return sim_messagef (SCPE_IERR, "function: %s (\"\", gbuf, 0); returned a non empty string: \"%s\"\n", t->function_name, remainder);
while (*input) {
while ((input != NULL) && (*input != '\0')) {
char end_char_string[32];
if (sim_isprint (d->end_char))

View file

@ -332,6 +332,7 @@ if (((*file == '"') && (file[strlen (file) - 1] == '"')) ||
if (without_quotes == NULL)
return NULL;
if (SCPE_OK != sim_decode_quoted_string (file, without_quotes, &dsize)) {
free (without_quotes);
errno = EINVAL;
return NULL;
}