Fix out of bound write when 30 arguments are given to the spacestate script.
This commit is contained in:
parent
29a047eea9
commit
288c68ff34
1 changed files with 1 additions and 1 deletions
|
@ -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 < 31; i++) {
|
||||
for (i = 0, j = 1; i < strlen(script) && j < 30; i++) {
|
||||
if (script[i] == ' ') {
|
||||
script[i] = '\0';
|
||||
argv[j++] = &script[i+1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue