summaryrefslogtreecommitdiff
path: root/gps2udp.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-08-09 18:33:56 -0700
committerGary E. Miller <gem@rellim.com>2016-08-09 18:34:40 -0700
commit71ca59c4b97f577328d0eec4b9ff6a1948ce7644 (patch)
treef09e7403dc41867e71448123b95fe4357da1c1ba /gps2udp.c
parent1a940a8c8e75f98d1366f86ba6801ff10a14e480 (diff)
downloadgpsd-71ca59c4b97f577328d0eec4b9ff6a1948ce7644.tar.gz
oWhoops, don't fix the fix. Plus an off-by one.
Eric already fixed this.
Diffstat (limited to 'gps2udp.c')
-rw-r--r--gps2udp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gps2udp.c b/gps2udp.c
index af36f1ad..83450798 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -234,6 +234,9 @@ static ssize_t read_gpsd(char *message, size_t len)
FD_ZERO(&master);
FD_SET(gpsdata.gps_fd, &master);
+ /* allow room for trailing NUL */
+ len--;
+
/* loop until we get some data or an error */
for (ind = 0; ind < (int)len;) {
int result;