summaryrefslogtreecommitdiff
path: root/tools/test-runner.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2018-05-23 16:36:11 +0200
committerMarcel Holtmann <marcel@holtmann.org>2018-05-23 16:36:11 +0200
commita0e2499f5d16cf405c6f9f800a6ad271bfd3c383 (patch)
treecb2f272dbe4273d26c0c97140d9ce8c7a792e8cd /tools/test-runner.c
parent8e6b1440e6510f58fa51d8ad95c45ebc37ed5ca9 (diff)
downloadbluez-a0e2499f5d16cf405c6f9f800a6ad271bfd3c383.tar.gz
tools: Fix compiler warning from wrong array size
Diffstat (limited to 'tools/test-runner.c')
-rw-r--r--tools/test-runner.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/test-runner.c b/tools/test-runner.c
index fb8f7e2ff..0a298dc6a 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -51,7 +51,7 @@
#define WAIT_ANY (-1)
#endif
-#define CMDLINE_MAX 2048
+#define CMDLINE_MAX (2048 * 10)
static const char *own_binary;
static char **test_argv;
@@ -243,9 +243,9 @@ static void start_qemu(void)
strcat(cwd, "/");
if (own_binary[0] == '/')
- snprintf(initcmd, sizeof(initcmd), "%s", own_binary);
+ snprintf(initcmd, sizeof(initcmd) + 1, "%s", own_binary);
else
- snprintf(initcmd, sizeof(initcmd), "%s/%s", cwd, own_binary);
+ snprintf(initcmd, sizeof(initcmd) + 1, "%s/%s", cwd, own_binary);
pos = snprintf(testargs, sizeof(testargs), "%s", test_argv[0]);