mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-10 22:33:18 -05:00
- Fix#500 use of non-initialised values on socket bind failures.
git-svn-id: file:///svn/unbound/trunk@2901 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
416df19f6d
commit
bee14bb0e2
2 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
16 May 2013: Wouter
|
||||
- Fix use-after-free in out-of-memory handling code (thanks Jake
|
||||
- Fix#499 use-after-free in out-of-memory handling code (thanks Jake
|
||||
Montgomery).
|
||||
- Fix#500 use on non-initialised values on socket bind failures.
|
||||
|
||||
15 May 2013: Wouter
|
||||
- Fix round-robin doesn't work with some Windows clients (from Ilya
|
||||
|
|
|
|||
|
|
@ -328,6 +328,8 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
|
|||
# else
|
||||
closesocket(s);
|
||||
# endif
|
||||
*noproto = 0;
|
||||
*inuse = 0;
|
||||
return -1;
|
||||
}
|
||||
# elif defined(IP_DONTFRAG)
|
||||
|
|
@ -341,12 +343,15 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
|
|||
# else
|
||||
closesocket(s);
|
||||
# endif
|
||||
*noproto = 0;
|
||||
*inuse = 0;
|
||||
return -1;
|
||||
}
|
||||
# endif /* IPv4 MTU */
|
||||
}
|
||||
if(bind(s, (struct sockaddr*)addr, addrlen) != 0) {
|
||||
*noproto = 0;
|
||||
*inuse = 0;
|
||||
#ifndef USE_WINSOCK
|
||||
#ifdef EADDRINUSE
|
||||
*inuse = (errno == EADDRINUSE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue