mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Safely use the strncat() function.
(closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user