summaryrefslogtreecommitdiff
path: root/rtcmdecode.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2006-08-19 05:30:49 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2006-08-19 05:30:49 +0000
commit409d42666cb5b94cbe0bcbd7cc2246032379f880 (patch)
tree300679f0ea3c1e9a5f9f94b2148db76a77a8533f /rtcmdecode.c
parent2a488def273905cb325ea99ec61af4bbdd5cc8a1 (diff)
downloadgpsd-409d42666cb5b94cbe0bcbd7cc2246032379f880.tar.gz
String safety, courtesy of snprintf, strlcat and strlcpy.
GPSD is now free from the often-misused strcat, strcpy and sprintf. Future code should not use unbounded string functions. Glibc users, please verify that the integrated strlcat and strlcpy are correctly linked in.
Diffstat (limited to 'rtcmdecode.c')
-rw-r--r--rtcmdecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rtcmdecode.c b/rtcmdecode.c
index ed1a8268..5c07c0f1 100644
--- a/rtcmdecode.c
+++ b/rtcmdecode.c
@@ -18,7 +18,7 @@ void gpsd_report(int errlevel, const char *fmt, ... )
char buf[BUFSIZ];
va_list ap;
- strcpy(buf, "rtcmdecode: ");
+ strlcpy(buf, "rtcmdecode: ", BUFSIZ);
va_start(ap, fmt) ;
(void)vsnprintf(buf + strlen(buf), sizeof(buf)-strlen(buf), fmt, ap);
va_end(ap);