[Devel] [ openser-Bugs-1681396 ] pkg_free on wrong pointer in presence module

SourceForge.net noreply at sourceforge.net
Thu Mar 15 19:20:00 CET 2007


Bugs item #1681396, was opened at 2007-03-15 12:21
Message generated for change (Comment added) made by anca_vamanu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1681396&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.2.x
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Ardjan Zwartjes (ardjan_zwartjes)
Assigned to: Nobody/Anonymous (nobody)
Summary: pkg_free on wrong pointer in presence module

Initial Comment:
Hello,

I have located a bug in the presence module in both the 1.2.0 release version and the current svn development version.
I have a test openser setup on which I want to use the presence module. I use a grandstream gxp2000 SIP phone and X-lite 3.0 build 34025 and I configured them to watch each others presence states.
When I start the X-lite client openser stops because one of the threads aborts during the execution of handle_subscribe in subscribe.c. 
After some research I found out that the problem occurs on line 1099 of subscribe.c. that call to pkg_free fails since the update_subscription on line 1091 changes the pointer to subs.status.s.
I've attached a patch that fixes this problem by storing subs.status.s and subs.reason.s in other variables that can be freed instead of the changed values. This probably isn't the best solution, but my knowledge of the openser sources is limited. I hope this information is enough to fix the problem.

Kind regards,
Ardjan Zwartjes,
Telecats.




----------------------------------------------------------------------

>Comment By: anca (anca_vamanu)
Date: 2007-03-15 18:20

Message:
Logged In: YES 
user_id=1614776
Originator: NO

Hello,

Indeed there are some cases in which the subs.status.s changes inside the
function update_subscription. It slip out of my view. I have corrected the
error now on svn using a similar solution as that suggested by you.  

Thanks, 

Anca Vamanu  

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1681396&group_id=139143



More information about the Devel mailing list