From 9e39e25aa1779e7b3a75be2cf67d161d9a2ef7a0 Mon Sep 17 00:00:00 2001 From: Wilco Baan Hofman Date: Mon, 28 Nov 2016 21:58:01 +0100 Subject: [PATCH] Now really fix out of bounds write. --- spacestate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacestate.c b/spacestate.c index 390e94d..9118551 100644 --- a/spacestate.c +++ b/spacestate.c @@ -37,7 +37,7 @@ static void safe_forkexec(TALLOC_CTX *mem_ctx, const char *script_in, const char unsigned int i, j; argv[0] = script; - for (i = 0, j = 1; i < strlen(script) && j < 30; i++) { + for (i = 0, j = 1; i < strlen(script) && j < 29; i++) { if (script[i] == ' ') { script[i] = '\0'; argv[j++] = &script[i+1];