lidtsvc: coverity fixes

This commit is contained in:
Peter Howkins
2018-04-12 01:38:02 +01:00
parent 91bb9a037a
commit 691dffb076
17 changed files with 52 additions and 20 deletions

View File

@@ -28,6 +28,7 @@
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
* (c) Copyright 1993, 1994 Novell, Inc.
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
@@ -274,7 +275,7 @@ _SHXbuf::filegen()
{
long i;
// compare all entries to a copy of the first entry
strcpy(filebuf, &bufptr[long(vec[0])]);
snprintf(filebuf, sizeof(filebuf), "%s", &bufptr[long(vec[0])]);
for (i = 1; i < vec.size(); i++)
{