summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-05-17 15:19:59 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-05-17 19:57:55 -0700
commit01e01bf6af25be1380ba004d62dd9ce94a445bc1 (patch)
treee79d297186a4644bec4f96d56aa5ea97beca5852
parent492912e95256f80fb4901402332bf6b7b29ee80b (diff)
downloadconnman-01e01bf6af25be1380ba004d62dd9ce94a445bc1.tar.gz
connman-01e01bf6af25be1380ba004d62dd9ce94a445bc1.tar.bz2
connman-01e01bf6af25be1380ba004d62dd9ce94a445bc1.zip
gdbus: do not call memset for terminating NUL
-rw-r--r--gdbus/object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index 7a941562..e378074e 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -72,7 +72,6 @@ static void print_arguments(GString *gstr, const char *sig,
complete = FALSE;
struct_level = dict_level = 0;
- memset(type, 0, sizeof(type));
/* Gather enough data to have a single complete type */
for (len = 0; len < (sizeof(type) - 1) && sig[i]; len++, i++) {
@@ -107,6 +106,8 @@ static void print_arguments(GString *gstr, const char *sig,
break;
}
+ type[len + 1] = '\0';
+
if (!complete) {
error("Unexpected signature: %s", sig);
return;