diff options
-rw-r--r-- | driver_ubx.c | 2 | ||||
-rw-r--r-- | gpsd.c | 2 | ||||
-rw-r--r-- | net_ntrip.c | 2 | ||||
-rw-r--r-- | packet.c | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/driver_ubx.c b/driver_ubx.c index 8c9bf896..40721c7c 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -550,7 +550,7 @@ bool ubx_write(struct gps_device_t * session, /*@ +type @*/ - /* coverity[printf_arg_mismatch] */ + /* coverity[pwprintf_arg_mismatch] */ gpsd_report(LOG_IO, "=> GPS: UBX class: %02x, id: %02x, len: %d, crc: %02x%02x\n", msg_class, msg_id, data_len, @@ -292,6 +292,7 @@ static int filesock(char *filename) (void)bind(sock, (struct sockaddr *)&addr, (int)sizeof(addr)); if (listen(sock, QLEN) == -1) { gpsd_report(LOG_ERROR, "can't listen on local socket %s\n", filename); + (void)close(sock); return -1; } /*@ +mayaliasunique +usedef @*/ @@ -2320,6 +2321,7 @@ int main(int argc, char *argv[]) char buf[BUFSIZ]; ssize_t rd; + /* coverity[tainted_scalar] Safe, it's never handed to exec */ while ((rd = read(cfd, buf, sizeof(buf) - 1)) > 0) { buf[rd] = '\0'; gpsd_report(LOG_IO, "<= control(%d): %s\n", cfd, buf); diff --git a/net_ntrip.c b/net_ntrip.c index 5ef8ab0f..bf01848d 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -389,7 +389,6 @@ static int ntrip_stream_get_parse(const struct ntrip_stream_t *stream, int dsock char buf[BUFSIZ]; int opts; memset(buf, 0, sizeof(buf)); - /* coverity[string_null] - guaranteed terminated by previous memset */ while (read(dsock, buf, sizeof(buf) - 1) == -1) { if (errno == EINTR) continue; @@ -399,6 +398,7 @@ static int ntrip_stream_get_parse(const struct ntrip_stream_t *stream, int dsock } /* parse 401 Unauthorized */ + /* coverity[string_null] - guaranteed terminated by the memset above */ if (strstr(buf, NTRIP_UNAUTH)!=NULL) { gpsd_report(LOG_ERROR, "not authorized for Ntrip stream %s/%s\n", stream->url, @@ -1984,6 +1984,7 @@ ssize_t packet_get(int fd, struct gps_packet_t *lexer) /*@ -modobserver @*/ errno = 0; + /* coverity[tainted_scalar] Safe, as it's never handed to exec */ recvd = read(fd, lexer->inbuffer + lexer->inbuflen, sizeof(lexer->inbuffer) - (lexer->inbuflen)); /*@ +modobserver @*/ |