summaryrefslogtreecommitdiff
path: root/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index e12871ad0..b747997c9 100755
--- a/cli.c
+++ b/cli.c
@@ -325,7 +325,7 @@ static char *complete_fn(char *line, char *word, int pos, int state)
if (pos != 1)
return NULL;
if (word[0] == '/')
- strncpy(filename, word, sizeof(filename));
+ strncpy(filename, word, sizeof(filename)-1);
else
snprintf(filename, sizeof(filename), "%s/%s", AST_MODULE_DIR, word);
c = (char*)filename_completion_function(filename, state);