[Devel] [ openser-Bugs-1653286 ] tm: static path_vec buffer get's assigned to shm-pointer

SourceForge.net noreply at sourceforge.net
Wed Feb 7 16:44:47 CET 2007


Bugs item #1653286, was opened at 2007-02-06 15:20
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1653286&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 devel
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Marcus Hunger (marcushunger)
Assigned to: Bogdan (bogdan_iancu)
Summary: tm: static path_vec buffer get's assigned to shm-pointer

Initial Comment:
t_forward_nonack acquires a pointer to a branch's path vector using get_branch and passes it to add_uac. get_branch returns a pointer to a static buffer. add_uac assigns this pointer to (struct sip_msg) msg->path_vec, which later get's freed using shm_free. 
the attached patch fixes this by making a copy of the path vector stored in shared memory before assigning it.


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

>Comment By: Bogdan (bogdan_iancu)
Date: 2007-02-07 17:44

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

ok - perfect, bug closed.

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

Comment By: Marcus Hunger (marcushunger)
Date: 2007-02-07 17:33

Message:
Logged In: YES 
user_id=1704473
Originator: YES

Hi Bogdan,
I tested it successfully on 1.1.1. Unfortunatly, the devel branch does not
compile right now, but I'll test that later. 

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

Comment By: Bogdan (bogdan_iancu)
Date: 2007-02-07 14:26

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

Hi Marcus,

I applied a fix on CVS...could you please update and test to see if it
solves the problem?

thanks and regards,
Bogdan

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

Comment By: Bogdan (bogdan_iancu)
Date: 2007-02-06 20:40

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

Hi Marcus,

thanks for the report - good catch ;) . Andread Granig (the author of the
patch support in openser) already reported some problems when using path
hdr, but was not possible to find the problem.

on the other side, the fis is not correct, as set_path_vector() makes a
copy in pkg (private) memeory and not in the shared one. The correct fix
should be to restore the path to the original value (as before calling
add_uac())  - similar to how is done for socket and flags. I will take care
of it.

Thanks and regards,
bogdan

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

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



More information about the Devel mailing list