Imported portableproplib-0.6.4.

This commit is contained in:
Juan RP
2014-05-17 20:25:14 +02:00
parent a3f2898ea6
commit cafbca06e7
12 changed files with 117 additions and 104 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: prop_string.c,v 1.11 2008/08/03 04:00:12 thorpej Exp $ */
/* $NetBSD: prop_string.c,v 1.12 2014/03/26 18:12:46 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -337,7 +337,7 @@ prop_string_append(prop_string_t dst, prop_string_t src)
cp = _PROP_MALLOC(len + 1, M_PROP_STRING);
if (cp == NULL)
return (false);
sprintf(cp, "%s%s", prop_string_contents(dst),
snprintf(cp, len + 1, "%s%s", prop_string_contents(dst),
prop_string_contents(src));
ocp = dst->ps_mutable;
dst->ps_mutable = cp;
@ -371,7 +371,7 @@ prop_string_append_cstring(prop_string_t dst, const char *src)
cp = _PROP_MALLOC(len + 1, M_PROP_STRING);
if (cp == NULL)
return (false);
sprintf(cp, "%s%s", prop_string_contents(dst), src);
snprintf(cp, len + 1, "%s%s", prop_string_contents(dst), src);
ocp = dst->ps_mutable;
dst->ps_mutable = cp;
dst->ps_size = len;