< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

RE: [reSIProcate] Bug in SDP Parser?


Title: Message

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

 

Scott

 


From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] 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@xxxxxxxxxxxxxxx

Web 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.