Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in ListSession proxy action #5

Open
pgelinas opened this issue Nov 6, 2013 · 1 comment
Open

Segfault in ListSession proxy action #5

pgelinas opened this issue Nov 6, 2013 · 1 comment

Comments

@pgelinas
Copy link

pgelinas commented Nov 6, 2013

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).

@davies147
Copy link
Owner

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//issues/5
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants