aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_speech_utils.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-07 06:36:33 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-07 06:36:33 +0000
commit2d66183adf20c8b3898a3bfc97627d55dff7891f (patch)
treee1d83f46856427c7e9df46336f418ec059a92c57 /apps/app_speech_utils.c
parent6623be8860eb9337ebbc3a5a32388270fac5628b (diff)
Safely use the strncat() function.
(closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106552 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_speech_utils.c')
-rw-r--r--apps/app_speech_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index e45459166..64d0f1bc4 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -735,7 +735,7 @@ static int speech_background(struct ast_channel *chan, void *data)
}
time(&start);
snprintf(tmp, sizeof(tmp), "%c", f->subclass);
- strncat(dtmf, tmp, sizeof(dtmf));
+ strncat(dtmf, tmp, sizeof(dtmf) - strlen(dtmf) - 1);
/* If the maximum length of the DTMF has been reached, stop now */
if (max_dtmf_len && strlen(dtmf) == max_dtmf_len)
done = 1;