summaryrefslogtreecommitdiff
path: root/ubx.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2007-06-30 04:42:46 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2007-06-30 04:42:46 +0000
commit0f674fb53099bdd3d40331f8a8dabea644f7c595 (patch)
tree3f3ff9105a010f2bcc46e5c13bb9c3b7885fadae /ubx.c
parent06877e93ebd975766f87ccfd0c3b267685fd542c (diff)
downloadgpsd-0f674fb53099bdd3d40331f8a8dabea644f7c595.tar.gz
actually, strlcpy would be wiser...
Diffstat (limited to 'ubx.c')
-rw-r--r--ubx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubx.c b/ubx.c
index cfb6bea2..87985301 100644
--- a/ubx.c
+++ b/ubx.c
@@ -181,7 +181,7 @@ ubx_msg_inf(unsigned char *buf, size_t data_len)
if (data_len > MAX_PACKET_LENGTH-1)
data_len = MAX_PACKET_LENGTH-1;
- memcpy(txtbuf, buf+6, data_len); txtbuf[data_len] = '\0';
+ strlcpy(txtbuf, buf+6, MAX_PACKET_LENGTH); txtbuf[data_len] = '\0';
switch (msgid) {
case UBX_INF_DEBUG:
gpsd_report(LOG_PROG, "UBX_INF_DEBUG: %s\n", txtbuf);