dthelp: more coverity fixes

This commit is contained in:
Peter Howkins
2018-04-11 02:07:55 +01:00
parent f4e3cb8327
commit 10468068ac
9 changed files with 14 additions and 7 deletions

View File

@@ -75,7 +75,7 @@ int main(argc, argv)
fprintf(stderr, "**** Specify interface file ****\n") ;
exit(TRUE) ;
}
strncpy(iffile, argv[1], IFLEN) ;
strncpy(iffile, argv[1], IFLEN - 1) ;
initialize() ;
while (TRUE) {
m_token = scan() ;

View File

@@ -6395,7 +6395,7 @@ while (incr)
* the amount of padding needed in between the vstruct and the first
* virpage to make everything work
*/
static int CompressVstruct()
static void CompressVstruct()
{
#define COMPRESS_PAD_LENGTH 10
char buffer[BUFSIZ], zTemp[4];

View File

@@ -72,8 +72,7 @@ void entout(fname)
int nameindex ;
LOGICAL start ;
strncpy(efilename, fname, ENTFILENAME) ;
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
snprintf(efilename, sizeof(efilename), "%s.h", fname);
m_openchk(&entfile, efilename, "w") ;
fprintf(entfile, "#include \"entdef.h\"\n") ;