Loading res_init.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ int res_vinit(res_state statp, int preinit) { statp->retrans = RES_TIMEOUT; statp->retry = RES_DFLRETRY; statp->options = RES_DEFAULT; statp->id = res_randomid(); statp->id = arc4random_uniform(65536); statp->_mark = MARK_UNSET; } Loading res_mkquery.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ int res_nmkquery(res_state statp, int op, /* opcode of query */ if ((buf == NULL) || (buflen < HFIXEDSZ)) return (-1); memset(buf, 0, HFIXEDSZ); hp = (HEADER*) (void*) buf; hp->id = htons(res_randomid()); hp->id = htons(arc4random_uniform(65536)); hp->opcode = op; hp->rd = (statp->options & RES_RECURSE) != 0U; hp->ad = (statp->options & RES_USE_DNSSEC) != 0U; Loading res_send.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ static int random_bind(int s, int family) { /* first try to bind to a random source port a few times */ for (j = 0; j < 10; j++) { /* find a random port between 1025 .. 65534 */ int port = 1025 + (res_randomid() % (65535 - 1025)); int port = 1025 + (arc4random_uniform(65535 - 1025)); if (family == AF_INET) u.sin.sin_port = htons(port); else Loading resolv_private.h +0 −2 Original line number Diff line number Diff line Loading @@ -250,8 +250,6 @@ int res_getservers(res_state, sockaddr_union*, int); struct android_net_context; /* forward */ void res_setnetcontext(res_state, const struct android_net_context*); u_int res_randomid(void); int getaddrinfo_numeric(const char* hostname, const char* servname, addrinfo hints, addrinfo** result); Loading Loading
res_init.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ int res_vinit(res_state statp, int preinit) { statp->retrans = RES_TIMEOUT; statp->retry = RES_DFLRETRY; statp->options = RES_DEFAULT; statp->id = res_randomid(); statp->id = arc4random_uniform(65536); statp->_mark = MARK_UNSET; } Loading
res_mkquery.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ int res_nmkquery(res_state statp, int op, /* opcode of query */ if ((buf == NULL) || (buflen < HFIXEDSZ)) return (-1); memset(buf, 0, HFIXEDSZ); hp = (HEADER*) (void*) buf; hp->id = htons(res_randomid()); hp->id = htons(arc4random_uniform(65536)); hp->opcode = op; hp->rd = (statp->options & RES_RECURSE) != 0U; hp->ad = (statp->options & RES_USE_DNSSEC) != 0U; Loading
res_send.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ static int random_bind(int s, int family) { /* first try to bind to a random source port a few times */ for (j = 0; j < 10; j++) { /* find a random port between 1025 .. 65534 */ int port = 1025 + (res_randomid() % (65535 - 1025)); int port = 1025 + (arc4random_uniform(65535 - 1025)); if (family == AF_INET) u.sin.sin_port = htons(port); else Loading
resolv_private.h +0 −2 Original line number Diff line number Diff line Loading @@ -250,8 +250,6 @@ int res_getservers(res_state, sockaddr_union*, int); struct android_net_context; /* forward */ void res_setnetcontext(res_state, const struct android_net_context*); u_int res_randomid(void); int getaddrinfo_numeric(const char* hostname, const char* servname, addrinfo hints, addrinfo** result); Loading