aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli.c b/cli.c
index 7e4455584..d577943ea 100755
--- a/cli.c
+++ b/cli.c
@@ -36,10 +36,10 @@
void ast_cli(int fd, char *fmt, ...)
{
- char stuff[4096];
+ char *stuff;
va_list ap;
va_start(ap, fmt);
- vsnprintf(stuff, sizeof(stuff), fmt, ap);
+ vasprintf(&stuff, fmt, ap);
va_end(ap);
write(fd, stuff, strlen(stuff));
}