diff options
author | Gary E. Miller <gem@rellim.com> | 2018-07-14 12:17:35 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-07-14 12:17:35 -0700 |
commit | 6bba8b329fc7687b15863d30471d5af402467802 (patch) | |
tree | 10975c312ee76bf58c4f66b6997e07c4f5e5e4c3 /libgps.h | |
parent | 692427a17aeb54d69826def759cc1f1da605ba33 (diff) | |
download | gpsd-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 *); |