aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-15 15:40:45 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-15 15:40:45 +0000
commitfd3e5d670f37bd82cbcc75d5dc2093169dc3ee24 (patch)
tree0c0a2c8b5d0005c875bfb5ceada84e6825a2c986 /pbx
parent10b67797f4558a86183363498ade3aca0986ae37 (diff)
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/branches/1.4@85556 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 21bb4e0fd..0b8a68175 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -578,8 +578,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;