aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-02 14:12:35 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-02 14:12:35 +0000
commit1ed2a899a5c0c910d9acdf72b3931a50cfa78507 (patch)
tree5e09df83464362476f568a862e6722f252efa1f9 /channels
parentda5beeb8744ad819319b560d4cda0ee4cdc321b2 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@84370 f38db490-d61c-443f-a65b-d21fe96a405b
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 4b7d3a889..98e10c5fa 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6939,7 +6939,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);
}
}