[reSIProcate] crash when ServerPublication refresh

Noiile noiile at hotmail.com
Tue Oct 18 04:21:25 CDT 2005


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/20051018/f354cbbf/attachment.htm>


More information about the resiprocate-devel mailing list