Merge pull request #219 from acepace/bugfix/fix_warnings_in_sambacry_util

Bugfix/fix warnings in sambacry util
This commit is contained in:
Daniel Goldberg 2018-12-02 11:10:13 +02:00 committed by GitHub
commit 078f03d9ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 17 deletions

View File

@ -101,9 +101,7 @@ int samba_init_module(void)
}
// Build commandline
strncat(commandline, RUN_MONKEY_CMD, sizeof(RUN_MONKEY_CMD) - 1);
strncat(commandline, MONKEY_DEST_NAME, sizeof(MONKEY_DEST_NAME) - 1);
strncat(commandline, " ", 1);
snprintf(commandline, sizeof(commandline), "%s%s ", RUN_MONKEY_CMD, MONKEY_DEST_NAME);
fread(commandline + strlen(commandline), 1, LINE_MAX_LENGTH, pFile);
fclose(pFile);