From: Joshua Colp Date: Mon, 16 Jun 2008 12:31:09 +0000 (+0000) Subject: Only compare the first 15 characters so that even if the charset is specified we... X-Git-Tag: 1.4.22-rc1~208 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=461020bed4d08ad4ede68e09e0beba106d2fa1e7;p=thirdparty%2Fasterisk.git Only compare the first 15 characters so that even if the charset is specified we still accept it as SDP. (closes issue #12803) Reported by: lanzaandrea Patches: chan_sip.c.diff uploaded by lanzaandrea (license 496) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122919 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9fc58e6cfb..6b5e8a147e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4928,7 +4928,7 @@ static int find_sdp(struct sip_request *req) content_type = get_header(req, "Content-Type"); /* if the body contains only SDP, this is easy */ - if (!strcasecmp(content_type, "application/sdp")) { + if (!strncasecmp(content_type, "application/sdp", 15)) { req->sdp_start = 0; req->sdp_end = req->lines; return req->lines ? 1 : 0;