[Asterisk-cvs] asterisk cli.c,1.10,1.11

markster at lists.digium.com markster at lists.digium.com
Tue Oct 21 22:26:55 CDT 2003


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv3203

Modified Files:
	cli.c 
Log Message:
Switch to vasprintf (bug #398) dropping bogus free()


Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cli.c	27 Sep 2003 02:45:37 -0000	1.10
+++ cli.c	22 Oct 2003 03:52:56 -0000	1.11
@@ -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));
 }




More information about the svn-commits mailing list