Hello!
On Wed, Jun 05, 2013 at 09:10:10PM -0400, honwel wrote:
> Ok, code is as follow:
[...]
> ngx_peer_connection_t *pc;
> u_char sa[NGX_SOCKADDRLEN];
> socklen_t len;
> u_char text[NGX_SOCKADDR_STRLEN];
> u_char *p;
> struct sockaddr_in *sin;
[...]
> if (pc->local_socket) {
> if (getsockname(pc->local_socket, (struct sockaddr *) &sa, &len) !=
> -1) {
At this point, len is uninitialized. It is used by getsockname()
as an input paramter though, and specifies the length of
supplied sockaddr structure.
--
Maxim Dounin
http://nginx.org/en/donation.html
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On Wed, Jun 05, 2013 at 09:10:10PM -0400, honwel wrote:
> Ok, code is as follow:
[...]
> ngx_peer_connection_t *pc;
> u_char sa[NGX_SOCKADDRLEN];
> socklen_t len;
> u_char text[NGX_SOCKADDR_STRLEN];
> u_char *p;
> struct sockaddr_in *sin;
[...]
> if (pc->local_socket) {
> if (getsockname(pc->local_socket, (struct sockaddr *) &sa, &len) !=
> -1) {
At this point, len is uninitialized. It is used by getsockname()
as an input paramter though, and specifies the length of
supplied sockaddr structure.
--
Maxim Dounin
http://nginx.org/en/donation.html
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx