diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2007-06-30 04:42:46 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2007-06-30 04:42:46 +0000 |
commit | 0f674fb53099bdd3d40331f8a8dabea644f7c595 (patch) | |
tree | 3f3ff9105a010f2bcc46e5c13bb9c3b7885fadae /ubx.c | |
parent | 06877e93ebd975766f87ccfd0c3b267685fd542c (diff) | |
download | gpsd-0f674fb53099bdd3d40331f8a8dabea644f7c595.tar.gz |
actually, strlcpy would be wiser...
Diffstat (limited to 'ubx.c')
-rw-r--r-- | ubx.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |