diff options
-rw-r--r-- | doc/explan_libgpsd_core.c.xml | 2 | ||||
-rw-r--r-- | driver_geostar.c | 4 | ||||
-rw-r--r-- | driver_navcom.c | 3 | ||||
-rw-r--r-- | driver_nmea2000.c | 2 | ||||
-rw-r--r-- | driver_sirf.c | 1 | ||||
-rw-r--r-- | driver_tsip.c | 1 | ||||
-rw-r--r-- | gpsd_json.c | 2 | ||||
-rw-r--r-- | json.c | 1 | ||||
-rw-r--r-- | monitor_garmin.c | 1 | ||||
-rw-r--r-- | monitor_oncore.c | 1 | ||||
-rw-r--r-- | monitor_sirf.c | 1 | ||||
-rw-r--r-- | monitor_ubx.c | 1 |
12 files changed, 16 insertions, 4 deletions
diff --git a/doc/explan_libgpsd_core.c.xml b/doc/explan_libgpsd_core.c.xml index 22ad92b3..7daf934c 100644 --- a/doc/explan_libgpsd_core.c.xml +++ b/doc/explan_libgpsd_core.c.xml @@ -94,7 +94,7 @@ </row> <row> <entry><function>int gpsd_activate(struct gps_device_t *session, bool reconfigurable)</function></entry> - <entry><para>Id tge devicename matches an NTRIP or DGNSS URI, hand + <entry><para>If the devicename matches an NTRIP or DGNSS URI, hand off to special code for opening a socket to that source over the network.</para><para>Try and open the device, returning -1 if we fail.</para><para>Probe all possible drivers to see if one diff --git a/driver_geostar.c b/driver_geostar.c index 60d80eb4..c6cb5f0d 100644 --- a/driver_geostar.c +++ b/driver_geostar.c @@ -546,6 +546,7 @@ static bool geostar_speed_switch(struct gps_device_t *session, speed_t speed, char parity, int stopbits) { unsigned char buf[4 * 4]; + int iparity; switch (parity) { case 'E': @@ -562,11 +563,12 @@ static bool geostar_speed_switch(struct gps_device_t *session, parity = (char)0; break; } + iparity = parity; putbe32(buf, 0, session->driver.geostar.physical_port); putbe32(buf, 4, speed); putbe32(buf, 8, stopbits); - putbe32(buf, 12, parity); + putbe32(buf, 12, iparity); (void)geostar_write(session, 0x41, buf, 4); return true; /* it would be nice to error-check this */ diff --git a/driver_navcom.c b/driver_navcom.c index 081cee1a..ffb7f393 100644 --- a/driver_navcom.c +++ b/driver_navcom.c @@ -334,6 +334,7 @@ static gps_mask_t handle_0x15(struct gps_device_t *session) uint8_t port, cmd_id = getub(buf, 3); gpsd_log(&session->context->errout, LOG_PROG, "Navcom: received packet type 0x15 (Negative Acknowledge)\n"); + /* coverity_submit[tainted_data] */ for (n = 4; n < (msg_len - 2); n += 2) { uint8_t err_id = getub(buf, n); uint8_t err_desc = getub(buf, n + 1); @@ -726,6 +727,7 @@ static gps_mask_t handle_0x86(struct gps_device_t *session) /* Satellite details */ i = nsu = 0; + /* coverity_submit[tainted_data] */ for (n = 17; n < msg_len; n += 14) { uint8_t prn, ele, ca_snr, p2_snr, log_channel, hw_channel, s, stat; uint16_t azm, dgps_age; @@ -827,6 +829,7 @@ static gps_mask_t handle_0xb0(struct gps_device_t *session) tm_slew_acc, status, ((status & 0x80) ? "channel time set - " : ""), ((status & 0x40) ? "stable" : "not stable"), status & 0x0f); + /* coverity_submit[tainted_data] */ for (n = 11; n < msg_len - 1; n += 16) { uint8_t sv_status = getub(buf, n); uint8_t ch_status = getub(buf, n + 1); diff --git a/driver_nmea2000.c b/driver_nmea2000.c index 8e0f15c3..76da0002 100644 --- a/driver_nmea2000.c +++ b/driver_nmea2000.c @@ -36,7 +36,7 @@ #define NMEA2000_FAST_DEBUG 0 static struct gps_device_t *nmea2000_units[NMEA2000_NETS][NMEA2000_UNITS]; -static char can_interface_name[NMEA2000_NETS][CAN_NAMELEN]; +static char can_interface_name[NMEA2000_NETS][CAN_NAMELEN+1]; typedef struct PGN { diff --git a/driver_sirf.c b/driver_sirf.c index 6259bb9f..0cb23d44 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -261,6 +261,7 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg) /* calculate CRC */ crc = 0; + /* coverity_submit[tainted_data] */ for (i = 0; i < len; i++) crc += (int)msg[4 + i]; crc &= 0x7fff; diff --git a/driver_tsip.c b/driver_tsip.c index 476c7348..a77cbaa3 100644 --- a/driver_tsip.c +++ b/driver_tsip.c @@ -214,6 +214,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) u4 = getub(buf, 6); /* Build hour */ s2 = (int16_t)getbeu16(buf, 10); /* Hardware Code */ u5 = getub(buf, 12); /* Length of Hardware ID */ + /* coverity_submit[tainted_data] */ for (i=0; i < (int)u5; i++) { buf2[i] = (char)getub(buf, 13+i); /* Hardware ID in ASCII */ } diff --git a/gpsd_json.c b/gpsd_json.c index 530ee3dd..aca3955a 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -1467,7 +1467,7 @@ void json_aivdm_dump(const struct ais_t *ais, "Vessels may proceed. One way traffic.", "Vessels may proceed. Two way traffic.", "Vessels shall proceed on specific orders only.", - "Vessels in main channel shall not proceed." + "Vessels in main channel shall not proceed.", "Vessels in main channel shall proceed on specific orders only.", "Vessels in main channel shall proceed on specific orders only.", "I = \"in-bound\" only acceptable.", @@ -421,6 +421,7 @@ static int json_internal_read_object(const char *cp, } else *pval++ = *cp; break; + /* coverity[unterminated_case] */ case post_val: /* * We know that cursor points at the first spec matching diff --git a/monitor_garmin.c b/monitor_garmin.c index f370cab4..60016435 100644 --- a/monitor_garmin.c +++ b/monitor_garmin.c @@ -171,6 +171,7 @@ static void garmin_bin_update(uint16_t pkt_id, uint32_t pkt_size UNUSED, unsigne break; case 0x33: /* Position Record */ + /* coverity_submit[tainted_data] */ display(miscwin, 0, 6, "%-24s", unix_to_iso8601(session.gpsdata.fix.time, tbuf, sizeof(tbuf))); pvt = (cpo_pvt_data *)pkt_data; diff --git a/monitor_oncore.c b/monitor_oncore.c index 2448202e..3d65d4f5 100644 --- a/monitor_oncore.c +++ b/monitor_oncore.c @@ -353,6 +353,7 @@ static void oncore_update(void) (void)mvwprintw(Enwin, 2, 18, "%6.1f us", alarm); (void)mvwprintw(Enwin, 3, 13, "%14s", pps_ctrl[ctrl]); (void)mvwprintw(Enwin, 4, 24, "%3s", pulse ? "on" : "off"); + /* coverity_submit[tainted_data] */ (void)mvwprintw(Enwin, 5, 24, "%3s", pps_sync[sync]); (void)mvwprintw(Enwin, 6, 20, "%7s", traim_sol[sol_stat]); (void)mvwprintw(Enwin, 7, 11, "%16s", traim_status[status]); diff --git a/monitor_sirf.c b/monitor_sirf.c index 8c99b93b..314fa4a6 100644 --- a/monitor_sirf.c +++ b/monitor_sirf.c @@ -312,6 +312,7 @@ static void sirf_update(void) (int)getub(buf, 28)); /* SV list */ (void)wmove(mid2win, 4, 10); + /* coverity_submit[tainted_data] */ for (i = 0; i < (int)getub(buf, 28); i++) (void)wprintw(mid2win, " %2d", (int)getub(buf, 29 + i)); monitor_log("MND 0x02="); diff --git a/monitor_ubx.c b/monitor_ubx.c index b216f0a0..2ba82de8 100644 --- a/monitor_ubx.c +++ b/monitor_ubx.c @@ -237,6 +237,7 @@ static void ubx_update(void) data_len = (size_t) getles16(buf, 4); switch (msgid) { case UBX_NAV_SVINFO: + /* coverity_submit[tainted_data] */ display_nav_svinfo(&buf[6], data_len); break; case UBX_NAV_DOP: |