dtudcfonted: Resolve further coverity issues

This commit is contained in:
Peter Howkins
2018-03-30 22:09:47 +01:00
parent e507de959e
commit e195df4b50
20 changed files with 51 additions and 44 deletions

View File

@@ -1142,7 +1142,7 @@ char **fontname ;
ep++ ;
}
*ep = '\0' ;
strcpy(fntbuf, sp) ;
snprintf(fntbuf, sizeof(fntbuf), "%s", sp) ;
getstat |= 0x01 ;
fclose( fp );
if (head.snf_file != NULL) {

View File

@@ -1638,7 +1638,7 @@ char *path;
char *cmd;
#endif
{
char *cmd_path;
char *cmd_path = NULL;
struct stat st;
char *end;
char chr_sv;
@@ -1660,7 +1660,7 @@ char *cmd;
if( st.st_mode & S_IFREG ) {
cmd_path = realloc( cmd_path, strlen( cmd_path ) + 1 );
return cmd_path;
} else continue ;
}
}
FreeString( cmd_path ) ;
}