diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-20 20:23:20 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-20 20:23:20 +0000 |
commit | 58363a66b44275c35e728b4d3cf6b66b91d4e2ac (patch) | |
tree | c4e128e43cc9919844403ce740b71ff6dc24ff61 /res/res_agi.c | |
parent | 55fd6ef0e8a5c52a3d7491a011da4c1d96d5bcf6 (diff) |
check array bounds when parsing arguments to AGI (issue #5868)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.0@7558 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r-- | res/res_agi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index 830a11278..8b2dc0c39 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1649,9 +1649,8 @@ static int agi_exec_full(struct ast_channel *chan, void *data, int enhanced, int strncpy(buf, data, sizeof(buf) - 1); memset(&agi, 0, sizeof(agi)); - while ((stringp = strsep(&tmp, "|"))) { + while ((stringp = strsep(&tmp, "|")) && argc < MAX_ARGS - 1) argv[argc++] = stringp; - } argv[argc] = NULL; LOCAL_USER_ADD(u); |