summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-05-22 09:21:34 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-05-22 10:18:39 (GMT)
commita99487eac8e93c887e23e524b31e03904b318669 (patch)
tree27e7e6530c8b0576461d910bd343d590cea8b754 /client
parent7409ebb636df33202c8271963bb7619a4e20bf8c (diff)
downloadconnman-a99487eac8e93c887e23e524b31e03904b318669.zip
connman-a99487eac8e93c887e23e524b31e03904b318669.tar.gz
connman-a99487eac8e93c887e23e524b31e03904b318669.tar.bz2
client: Reserve space for trailing NULL in the array
Diffstat (limited to 'client')
-rw-r--r--client/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/input.c b/client/input.c
index a6eb136..78f68a9 100644
--- a/client/input.c
+++ b/client/input.c
@@ -96,7 +96,7 @@ static void rl_handler(char *input)
args = g_strsplit(input, " ", 0);
num = g_strv_length(args);
- trim_args = g_new0(char *, num);
+ trim_args = g_new0(char *, num + 1);
for (i = 0, len = 0; i < num; i++) {
if (*args[i] != '\0') {
trim_args[len] = args[i];