[sr-dev] [tracker] Task opened: bugs in uac_redirect module (Attachment added)
bugtracker at sip-router.org
Tue Jul 23 17:01:07 CEST 2013
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Federico Cabiddu (lester)
Attached to Project - sip-router
Summary - bugs in uac_redirect module
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - Low
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - Hi,
working with kamailio 4.0.2 and uac_redirect module I found several problems.
I have a script with two failure routes each calling get_redirects("MAX", "REASON"): when the 2nd of those routes is executed kamailio crashes in acc module (in acc_log_request function).
Digging the problem I found that the function get_redirect_fixup, for the second call, exits before setting the acc_param. This causes the acc module to crash: the function which crashes is acc_log_request (acc.c: 244, maybe it would be worth adding a null pointer check before calling memcpy).
The 2nd problem is related to the uac_redirect "acc_db_table" parameter: there is no fixup of the parameter so, when uac_redirect calls acc_db_request, the table ens up with a totally wrong name.
The 3rd problem is in acc module, in acc_db_set_table_name function: even if env_set_text set the s and the len component all the following operations on the table name are done using the s part. This brings a problem when acc_db_request is called with table names which have different length. The solution I found for this problem is (quite rough, I admit) to put a '\0' at the end of the table name.
And last, the accounting records generated by get_redirects don't contain the error code: in this case I just added to get_redirect the code to put the reply code into the acc_param struct.
I attach two patches against release 4.0.2.
One or more files have been attached.
More information can be found at the following URL:
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
More information about the sr-dev