THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened. Details are below. User who did this - Alex Hermann (axlh)
Attached to Project - sip-router
Summary - Segfault in allow_trusted2
Task Type - Bug Report
Category - Modules kamailio
Status - Assigned
Assigned To - Daniel-Constantin Mierla
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - 3.1
Due in Version - Undecided
Due Date - Undecided
Details - if (allow_trusted("$si", "$proto"))

Will cause a segfault.


$proto is returned from the following code fragment in pv_core.c:

int pv_get_proto(struct sip_msg *msg, pv_param_t *param,
                pv_value_t *res)
{
        str s;
        if(msg==NULL)
                return -1;

        switch(msg->rcv.proto)
        {
                case PROTO_UDP:
                        s.s = "udp";
                        s.len = 3;
                break;



The "udp" string is allocated by the compiler in the TEXT segment, which by its 
nature is not writable. The tolower() which allow_trusted2() tries to do later is 
rewarded with a segfault.


Attached patch fixes the segfault.

One or more files have been attached.

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=102

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.

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to