summaryrefslogtreecommitdiff
path: root/json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-29 06:41:09 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-29 06:41:09 -0400
commit3ef1d9ecbef54ba5e4e6a8167a8dd5c5723aa94f (patch)
treeb7dcab4eb669ca6fe3fc18bd672bc53e5a3d2c57 /json.c
parentc48d0caf13ce030166fedad354e4732584584f50 (diff)
downloadgpsd-3ef1d9ecbef54ba5e4e6a8167a8dd5c5723aa94f.tar.gz
Magic-number and strncpy elimination. All regression tests pass
Diffstat (limited to 'json.c')
-rw-r--r--json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/json.c b/json.c
index 849c33df..e4f2d60f 100644
--- a/json.c
+++ b/json.c
@@ -442,7 +442,7 @@ static int json_internal_read_object(const char *cp,
&& parent->element_type != t_structobject
&& offset > 0)
return JSON_ERR_NOPARSTR;
- (void)strncpy(lptr, valbuf, cursor->len);
+ (void)strlcpy(lptr, valbuf, cursor->len);
break;
case t_boolean:
*((bool *) lptr) = (strcmp(valbuf, "true") == 0);