mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		
							
								
								
									
										3
									
								
								pbx.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								pbx.c
									
									
									
									
									
								
							| @@ -4483,7 +4483,8 @@ static int pbx_builtin_answer(struct ast_channel *chan, void *data) | ||||
| 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; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user