summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-11 19:56:42 -0700
committerGary E. Miller <gem@rellim.com>2018-09-11 19:58:17 -0700
commit52aab46cc0c3dca4bcd33d8b1c5e0eb11749ced6 (patch)
tree78d6668d1a8a3241cd3228bdabb647f8cfcd3a12
parentcf503096d5c268652b11d6cbf73ea087f7f30d7d (diff)
downloadgpsd-52aab46cc0c3dca4bcd33d8b1c5e0eb11749ced6.tar.gz
subtype: Make subtype string buffer longer.
The navcom driver could overflow subtype. This is an incompatible change to the size of devconfig_t. But API version already changed this dev cycle.
-rw-r--r--gps.h3
-rw-r--r--gpsd.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/gps.h b/gps.h
index fce26ea1..e427f5a4 100644
--- a/gps.h
+++ b/gps.h
@@ -38,6 +38,7 @@ extern "C" {
* 6.1 - Add navdata_t for more (nmea2000) info.
* 7.0 - add gps_fix_t.ecef (February 2018)
* changed prototype of gps_read() to add buffer parameters
+ * increased length of devconfig_t.subtype
*/
#define GPSD_API_MAJOR_VERSION 7 /* bump on incompatible changes */
#define GPSD_API_MINOR_VERSION 0 /* bump on compatible changes */
@@ -1907,7 +1908,7 @@ struct devconfig_t {
#define SEEN_RTCM3 0x04
#define SEEN_AIS 0x08
char driver[64];
- char subtype[64];
+ char subtype[96];
/* a buffer to hold data to output to GPS */
char hexdata[HEXDATA_MAX];
double activated;
diff --git a/gpsd.h b/gpsd.h
index 144cafee..75b6cc56 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -505,7 +505,7 @@ struct gps_device_t {
struct gps_lexer_t lexer;
int badcount;
int subframe_count;
- char subtype[64]; /* firmware version or subtype ID */
+ char subtype[96]; /* firmware version or subtype ID */
time_t opentime;
time_t releasetime;
bool zerokill;