summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-10-02 14:13:28 +0000
committerRussell Bryant <russell@russellbryant.com>2007-10-02 14:13:28 +0000
commitf58f7170d4024ee59ab1101342cd965f0985ab0d (patch)
treed8afa98bac0d0670a81ccb3cf370188a9a883e67 /channels
parentfe1d4b1d0411c0b9bce792ca4183c40a4c3517a9 (diff)
Merged revisions 84370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84370 | russell | 2007-10-02 09:12:35 -0500 (Tue, 02 Oct 2007) | 6 lines Use snprintf instead of sprintf in one place. There is no vulnerability here due to various buffer sizes around the code, but I still didn't like seeing a non length-limited copy of data coming off of the wire into a stack buffer, as this would be a problem in the future if buffer sizes elsewhere got changed or size limitations removed ... ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 2bd516b8d..5a99df4f5 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7737,7 +7737,7 @@ static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init)
if (!ast_strlen_zero(p->refer->refer_to))
add_header(&req, "Refer-To", p->refer->refer_to);
if (!ast_strlen_zero(p->refer->referred_by)) {
- sprintf(buf, "%s <%s>", p->refer->referred_by_name, p->refer->referred_by);
+ snprintf(buf, sizeof(buf), "%s <%s>", p->refer->referred_by_name, p->refer->referred_by);
add_header(&req, "Referred-By", buf);
}
}