{"action":"created","issue":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/212","labels_url":"https://api.github.com/repos/kamailio/kamailio/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/kamailio/kamailio/issues/212/comments","events_url":"https://api.github.com/repos/kamailio/kamailio/issues/212/events","html_url":"https://github.com/kamailio/kamailio/issues/212","id":88808667,"number":212,"title":"http_query causes memory corruption with AVPs","user":{"login":"scottgrim","id":12918799,"avatar_url":"https://avatars.githubusercontent.com/u/12918799?v=3","gravatar_id":"","url":"https://api.github.com/users/scottgrim","html_url":"https://github.com/scottgrim","followers_url":"https://api.github.com/users/scottgrim/followers","following_url":"https://api.github.com/users/scottgrim/following{/other_user}","gists_url":"https://api.github.com/users/scottgrim/gists{/gist_id}","starred_url":"https://api.github.com/users/scottgrim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottgrim/subscriptions","organizations_url":"https://api.github.com/users/scottgrim/orgs","repos_url":"https://api.github.com/users/scottgrim/repos","events_url":"https://api.github.com/users/scottgrim/events{/privacy}","received_events_url":"https://api.github.com/users/scottgrim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-16T18:52:11Z","updated_at":"2015-06-17T15:13:17Z","closed_at":null,"body":"I have found an instance where using an avp or xavp as the response variable for http_query will cause a segfault later in t_relay().  When I change the variable to a $var instead of an avp, there is no segfault.\r\n\r\nI can only recreate it with a specific URL. If I try to reproduce it by simply sending a plain text response from a static page, it does not segfault.\r\nThe http_query command is as follows:\r\nhttp_query(\"http://cnam.dashcs.com/?companyId=XXXXX&password=XXXXXXX&number=$avp(from_phone)\", \"$avp(cnam)\");\r\n\r\nversion: kamailio 4.3.0 (x86_64/linux) c6aa95\r\nflags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES\r\nADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB\r\npoll method support: poll, epoll_lt, epoll_et, sigio_rt, select.\r\nid: c6aa95 \r\ncompiled on 13:39:06 Jun 10 2015 with gcc 4.8.2\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/comments/112838912","html_url":"https://github.com/kamailio/kamailio/issues/212#issuecomment-112838912","issue_url":"https://api.github.com/repos/kamailio/kamailio/issues/212","id":112838912,"user":{"login":"scottgrim","id":12918799,"avatar_url":"https://avatars.githubusercontent.com/u/12918799?v=3","gravatar_id":"","url":"https://api.github.com/users/scottgrim","html_url":"https://github.com/scottgrim","followers_url":"https://api.github.com/users/scottgrim/followers","following_url":"https://api.github.com/users/scottgrim/following{/other_user}","gists_url":"https://api.github.com/users/scottgrim/gists{/gist_id}","starred_url":"https://api.github.com/users/scottgrim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottgrim/subscriptions","organizations_url":"https://api.github.com/users/scottgrim/orgs","repos_url":"https://api.github.com/users/scottgrim/repos","events_url":"https://api.github.com/users/scottgrim/events{/privacy}","received_events_url":"https://api.github.com/users/scottgrim/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T15:13:17Z","updated_at":"2015-06-17T15:13:17Z","body":"I installed from binary packages.  I'll try to make time to recompile it but it may be a bit before I can due to my current workload."}}