]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix problem with processing too many lines in process_sdp
authorMartin Pycko <martinp@digium.com>
Mon, 31 Mar 2003 15:55:29 +0000 (15:55 +0000)
committerMartin Pycko <martinp@digium.com>
Mon, 31 Mar 2003 15:55:29 +0000 (15:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@726 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 98644ad39e89482aa04ba202316694272066a080..882d3dffb34abe37c9be6c2431d184023e849d7a 100755 (executable)
@@ -1487,6 +1487,8 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
                }
                ast_rtp_set_m_type(p->rtp, codec);
                codecs += len;
+               /* Fix going to: a=rtpmap:0 PCMU/8000 line */
+               if ( (int)(strlen(m)-(int)(codecs-m)) < 0 ) break;
        }
 
        // Next, scan through each "a=rtpmap:" line, noting each