printf("dbmbuild abandoned\n");
#if defined(USE_DB) || defined(USE_TDB) || defined(USE_GDBM)
/* We created it, so safe to delete despite the name coming from outside */
- /* coverity[tainted_data] */
+ /* coverity[tainted_string] */
Uunlink(temp_dbmname);
#else
if (is_db)
int fd = open(filename, O_RDWR); /* use fd for both get & restore */
struct timespec tt[2];
- fstat(fd, &strestore);
+ if (fd < 0)
+ {
+ printf("open '%s': %s\n", filename, strerror(errno));
+ yield = 1;
+ goto CLEAN_UP;
+ }
+ if (fstat(fd, &strestore) != 0)
+ {
+ printf("fstat '%s': %s\n", filename, strerror(errno));
+ yield = 1;
+ close(fd);
+ goto CLEAN_UP;
+ }
i = system(command);
tt[0] = strestore.st_atim;
tt[1] = strestore.st_mtim;
- futimens(fd, tt);
- close(fd);
+ (void) futimens(fd, tt);
+ (void) close(fd);
#else
struct utimbuf ut;
kav_re = kav_re_inf;
}
- /* read report, linewise */
+ /* read report, linewise. Using size from stream to read amount of data
+ from same stream is safe enough. */
+ /* coverity[tainted_data] */
while (kav_reportlen > 0)
{
if ((bread = recv_line(sock, tmpbuf, sizeof(tmpbuf), tmo)) < 0)