summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;