[Asterisk-cvs] asterisk pbx.c,1.154.2.1,1.154.2.2

russell at lists.digium.com russell at lists.digium.com
Thu Oct 14 18:39:21 CDT 2004


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

Modified Files:
      Tag: v1-0
	pbx.c 
Log Message:
fix setlanguage seg fault (bug #2641)


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.154.2.1
retrieving revision 1.154.2.2
diff -u -d -r1.154.2.1 -r1.154.2.2
--- pbx.c	8 Oct 2004 23:29:50 -0000	1.154.2.1
+++ pbx.c	14 Oct 2004 22:39:40 -0000	1.154.2.2
@@ -4381,7 +4381,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