Segfault in ListSession proxy action
Hi,
I'm getting a segmentation fault whenever I try to do ProxyAction: ListSessions:
$ telnet localhost 1234
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager Proxy/1.28.2
ProxyAction: ListSessions
Connection closed by foreign host.
I've pined down the problem to proxyfunc.c line 53: I've changed the line to:
AddHeader(&m, "ProxyClientActionID: %s", c->actionid); and it seems to work now. I'm no C expert, but from my understanding there's no need for the ||"" expression since vsprintf will properly format even if c->actionid is full of \0 (as was my case).
Hi,
Thanks for that - Not sure what is happening there. Although the ||"" is not necessary, it should also be harmless.
Cheers, Steve
On 6 November 2013 19:27, Pascal Gélinas [email protected] wrote:
Hi,
I'm getting a segmentation fault whenever I try to do ProxyAction: ListSessions:
$ telnet localhost 1234 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Asterisk Call Manager Proxy/1.28.2 ProxyAction: ListSessions
Connection closed by foreign host.
I've pined down the problem to proxyfunc.c line 53: I've changed the line to: AddHeader(&m, "ProxyClientActionID: %s", c->actionid); and it seems to work now. I'm no C expert, but from my understanding there's no need for the ||"" expression since vsprintf will properly format even if c->actionid is full of \0 (as was my case).
— Reply to this email directly or view it on GitHubhttps://github.com/davies147/astmanproxy/issues/5 .