diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2012-05-17 15:19:59 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-05-17 19:58:01 -0700 |
commit | 37805e01977d983d52802cb85701e0453583924f (patch) | |
tree | 10f3c78155c0dce09d7f2a39e00453a8d79d5389 /gdbus | |
parent | a77fcca3c6d830044eab2b6109d08cb3369d481c (diff) | |
download | ofono-37805e01977d983d52802cb85701e0453583924f.tar.bz2 |
gdbus: do not call memset for terminating NUL
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/object.c | 3 |
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; |