[reSIProcate] crash when ServerPublication refresh

Scott Godin slgodin at icescape.com
Thu Oct 27 08:09:49 CDT 2005


I can't reproduce this problem using the SVN head.  If there is no
contents then Helper::extractFromPkcs7 just returns a
ConentsSecAttributes with mContent.get() as 0 and mAttributes.get() as
0.  There was a fix in REV 5068 to Helper::extractFromPkcs7.

 

Scott

 

________________________________

From: resiprocate-devel-bounces at list.sipfoundry.org
[mailto:resiprocate-devel-bounces at list.sipfoundry.org] On Behalf Of
Noiile
Sent: Tuesday, October 18, 2005 5:21 AM
To: resiprocate-devel
Subject: [reSIProcate] crash when ServerPublication refresh

 

resiprocate-devel, Hello 

 

when Publication refresh, the PUBBLISH have no Contents, it will be
crash at line 120 in function ServerPublication::dispatch().

Because Helper::extractFromPkcs7 will clone msg's content, but it is
NULL;

 

I think mLastBody does not need update when publication refresh,

so I changed the code as follows, It runs well, but I am not sure it's
right :

ServerPublication::dispatch()

{  

......    

     //mLastBody = Helper::extractFromPkcs7(msg,
*mDum.getSecurity());//NOIILE: if msg have no body, it will crash at
here.
      if (msg.getContents())
      {
         mLastBody = Helper::extractFromPkcs7(msg,
*mDum.getSecurity());//NOIILE
         handler->onUpdate(getHandle(), mEtag, msg, 
                           mLastBody.mContents.get(), 
                           mLastBody.mAttributes.get(), 
                           mExpires);
      }
      else
      {
         handler->onRefresh(getHandle(), mEtag, msg, 
                            mLastBody.mContents.get(), 
                            mLastBody.mAttributes.get(), 
                            mExpires);
      }

}

 

 

Noiile, noiile at hotmail.com

2005-10-18 

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


More information about the resiprocate-devel mailing list