[Asterisk-cvs] asterisk pbx.c,1.158,1.159

citats at lists.digium.com citats at lists.digium.com
Wed Oct 13 18:47:17 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/home/citats/cvs/asterisk

Modified Files:
	pbx.c 
Log Message:
Fix pbx_builtin_setlanguage to not seg when data is a NULL ptr.  Also fix AGI so we dont run into this with other specific problems as well. (bug 2641)

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- pbx.c	8 Oct 2004 04:23:22 -0000	1.158
+++ pbx.c	13 Oct 2004 22:47:42 -0000	1.159
@@ -4483,7 +4483,8 @@
 static int pbx_builtin_setlanguage(struct ast_channel *chan, void *data)
 {
 	/* Copy the language as specified */
-	strncpy(chan->language, (char *)data, sizeof(chan->language)-1);
+	if (data)
+		strncpy(chan->language, (char *)data, sizeof(chan->language)-1);
 	return 0;
 }
 




More information about the svn-commits mailing list