aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
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;