diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-13 22:47:42 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-13 22:47:42 +0000 |
commit | 329d3fc98e89253ba0e3bbac1432c0c037b38462 (patch) | |
tree | 4eb8f9fc181bdc2ba156c858dde38a2d3401757c /pbx.c | |
parent | 0c58b05560b1c6cb40251bb7f7e5d9280bd15703 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@3990 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |