summaryrefslogtreecommitdiff
path: root/gps2udp.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-21 18:23:46 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-21 18:23:46 -0500
commitab59cbb7b64909090d64866ebdf43fd27f584c5d (patch)
treec80d25e389f74cd506a733f8106235693b93f092 /gps2udp.c
parentaeb3bdae85bddab96c749dfc07ecf6d7e0b2fdf2 (diff)
downloadgpsd-ab59cbb7b64909090d64866ebdf43fd27f584c5d.tar.gz
Coverity/splint cleanup.
Turned up a bug in where a counter was incremented un the Navcom driver; this required one test rebuild.
Diffstat (limited to 'gps2udp.c')
-rw-r--r--gps2udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gps2udp.c b/gps2udp.c
index 7342dc05..c530275e 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -90,7 +90,7 @@ static int send_udp (char *nmeastring, size_t ind)
if (ind == 0) {
/* compute message size and add 0x0a 0x0d */
for (ind=0; nmeastring [ind] != '\0'; ind ++) {
- if (ind >= sizeof(message)) {
+ if (ind >= sizeof(message) - 3) {
fprintf(stderr, "gps2udp: too big [%s] \n", nmeastring);
return -1;
}