aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-15 15:47:46 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-15 15:47:46 +0000
commit644885493a3a94998e4b6945214facd041694d1b (patch)
tree773bf7ea7a3946e36a9bd13b49f688e57436d33b /pbx
parentcccf110de3d67c961935492c50e1cf1bac63b7a4 (diff)
Merged revisions 85556 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85556 | russell | 2007-10-15 10:40:45 -0500 (Mon, 15 Oct 2007) | 9 lines Ensure the buffer passed to ast_canmatch_extension() is properly initialized so that it is null terminated. (issue #10977) Reported by: dimas Patches: pbxdundi.patch uploaded by dimas (license 88) - small mods by me ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85557 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_dundi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index c2851eef2..860690f09 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -596,8 +596,8 @@ static int dundi_lookup_local(struct dundi_result *dr, struct dundi_mapping *map
} else {
/* No answers... Find the fewest number of digits from the
number for which we have no answer. */
- char tmp[AST_MAX_EXTENSION];
- for (x=0;x<AST_MAX_EXTENSION;x++) {
+ char tmp[AST_MAX_EXTENSION + 1] = "";
+ for (x = 0; x < (sizeof(tmp) - 1); x++) {
tmp[x] = called_number[x];
if (!tmp[x])
break;