Skip to content
Snippets Groups Projects
Commit 98e95ca4 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

A bit more Coverity follow-on

parent 261e6026
No related branches found
No related tags found
No related merge requests found
Pipeline #8094 passed
......@@ -2269,7 +2269,7 @@ change_settings(int connected)
if (xpbeep_sound_devices_enabled & audio_output_types[j].bit) {
if (audio_opts[0])
strlcat(audio_opts, ", ", sizeof(audio_opts));
strcat(audio_opts, audio_output_types[j].name);
strlcat(audio_opts, audio_output_types[j].name, sizeof(audio_opts));
}
}
if (!audio_opts[0])
......
......@@ -119,6 +119,7 @@ recv_nbytes(struct http_session *sess, uint8_t *buf, const size_t chunk_size, bo
set_msg(sess->req, "Socket Unreadable");
goto error_return;
}
// coverity[overflow:SUPPRESS]
rc = recv(sess->sock, &buf[received], chunk_size - received, 0);
if (rc < 0) {
set_msgf(sess->req, "recv() error %d", SOCKET_ERRNO);
......@@ -1121,8 +1122,10 @@ is_fresh(struct http_session *sess)
// Delete stale file
char *path;
int len = asprintf(&path, "%s/%s.lst", sess->req->cache_root, sess->req->name);
if (len > 0)
remove(path);
if (len > 0) {
if (remove(path))
fprintf(stderr, "Failed to remove %s from cache\n");
}
free(path);
}
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment