[reSIProcate] Bug in SDP Parser?

Scott Godin slgodin at icescape.com
Thu May 25 11:10:44 CDT 2006


Thanks - good finds!  I've committed these fixes.

 

Scott

 

________________________________

From: resiprocate-devel-bounces at list.sipfoundry.org
[mailto:resiprocate-devel-bounces at list.sipfoundry.org] On Behalf Of
Robert Mansfield
Sent: Tuesday, May 23, 2006 8:45 AM
To: Resiprocate
Subject: [reSIProcate] Bug in SDP Parser? 

 

All,

 

I believe I've spotted a couple of problems in the parser:-

 

1) Missing break

int parseTypedTime(ParseBuffer& pb)
{
   int v = pb.integer();
   if (!pb.eof())
   {
      switch (*pb.position())
      {
  case 's' :
     pb.skipChar();
     break;
  case 'm' :
     v *= 60;
     pb.skipChar();
     break;
  case 'h' :
     v *= 3600;
     pb.skipChar();

                        // BREAK??

  case 'd' :
     v *= 3600*24;
     pb.skipChar();
      }
   }
   return v;
}

 

2) SdpContents::Session::parse(ParseBuffer& pb)

..

..

   if (!pb.eof() && *pb.position() == 'u')
   {

    // The parser buffer is pointing at 'u', the generic Uri parser

   // needs the following two lines to work:-

    // pb.skipChar('u');
    //  pb.skipChar(Symbols::EQUALS[0]);


      mUri.parse(pb);
      skipEol(pb);
   }

 

Could someone confirm and add a fix?

 

Thanks,

 

Rob.

 

============================

Robert Mansfield

Senior Software Engineer

Redwood Technologies Limited

Tel +[44] (0)1344 304 344

Fax +[44] (0)1344 304 345

E:mail mailto:rjm at redwoodtech.com <mailto:rjm at redwoodtech.com> 

Web http://www.redwoodtech.com <http://www.redwoodtech.com/> 

============================

Email Disclaimer

The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorised. If you are not the intended
recipient, any disclosure, copying, distribution or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful.
When addressed to our clients any opinions or advice contained in this
email are subject to the limitations of Redwood Technologies Limited's
standard terms and conditions of contract.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20060525/da6f9184/attachment.htm>


More information about the resiprocate-devel mailing list