Merged revisions 98934 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Tue, 15 Jan 2008 20:10:20 +0000 (20:10 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 15 Jan 2008 20:10:20 +0000 (20:10 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98934 | file | 2008-01-15 16:08:43 -0400 (Tue, 15 Jan 2008) | 4 lines

Based on the boundary found move over the correct amount.
(closes issue #11750)
Reported by: tasker

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98935 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index fd6e756..4018045 100644 (file)
@@ -5584,10 +5584,13 @@ static int find_sdp(struct sip_request *req)
                return 0;
 
        /* if there is no boundary marker, it's invalid */
-       if (!(search = strcasestr(content_type, ";boundary=")) && (!(search = strcasestr(content_type, "; boundary="))))
+       if ((search = strcasestr(content_type, ";boundary=")))
+               search += 10;
+       else if ((search = strcasestr(content_type, "; boundary=")))
+               search += 11;
+       else
                return 0;
 
-       search += 10;
        if (ast_strlen_zero(search))
                return 0;