summaryrefslogtreecommitdiff
path: root/libgps.h
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-07-14 12:17:35 -0700
committerGary E. Miller <gem@rellim.com>2018-07-14 12:17:35 -0700
commit6bba8b329fc7687b15863d30471d5af402467802 (patch)
tree10975c312ee76bf58c4f66b6997e07c4f5e5e4c3 /libgps.h
parent692427a17aeb54d69826def759cc1f1da605ba33 (diff)
downloadgpsd-6bba8b329fc7687b15863d30471d5af402467802.tar.gz
gps_read(): fix some nasty buffer overruns and corruptions.
Now pass an optional message buffer to gps_read(). Finally the JSON display in cgps works. Thanks to Virgin Orbit for their support fixing this bug.
Diffstat (limited to 'libgps.h')
-rw-r--r--libgps.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgps.h b/libgps.h
index 91d2d2c6..62c37423 100644
--- a/libgps.h
+++ b/libgps.h
@@ -21,7 +21,7 @@ extern int gps_sock_open(const char *, const char *,
struct gps_data_t *);
extern int gps_sock_close(struct gps_data_t *);
extern int gps_sock_send(struct gps_data_t *, const char *);
-extern int gps_sock_read(struct gps_data_t *);
+extern int gps_sock_read(struct gps_data_t *, char *message, int message_len);
extern bool gps_sock_waiting(const struct gps_data_t *, int);
extern int gps_sock_stream(struct gps_data_t *, unsigned int, void *);
extern const char *gps_sock_data(const struct gps_data_t *);