Welcome! Log In Create A New Profile

Advanced

Re: Valgrind reporting issue in connection->addr_text

May 07, 2019 05:16AM
Hi,

Thanks for the response. We fixed the issue related to casting and still didnt see any change in behavior where intermittently garbage values are being appended.
However, when we tried to get the ip address using alternate means, as follows the issue is not happening and Valgrind is also not reporting any issue:
struct sockaddr_in *sin = (struct sockaddr_in *)r->connection->sockaddr;
char *ip = apr_palloc(conf->pool, sizeof(char)*INET_ADDRSTRLEN);
inet_ntop(AF_INET, &(sin->sin_addr), ip, INET_ADDRSTRLEN);

Can you please suggest if there is any issue in earlier approach and using sockaddr is preferable approach?
Subject Author Posted

Valgrind reporting issue in connection->addr_text

bhagavathula May 06, 2019 02:08PM

Re: Valgrind reporting issue in connection->addr_text

Robert Paprocki May 06, 2019 02:14PM

Re: Valgrind reporting issue in connection->addr_text

bhagavathula May 07, 2019 05:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready