]> git.ipfire.org Git - thirdparty/glibc.git/commit
bindresvport() uses two static variables port and startport which are not
authorPeng Haitao <penght@cn.fujitsu.com>
Mon, 19 Nov 2012 06:53:07 +0000 (01:53 -0500)
committerCarlos O'Donell <carlos@systemhalted.org>
Mon, 19 Nov 2012 07:05:12 +0000 (02:05 -0500)
commitf6da27e53695ad1cc0e2a9490358decbbfdff5e5
treeee71c15d35def733fe7580fa7a5d3a2813ff1a2d
parent1f51ee9246b048d8966c36ddd2c26d7e0f927d83
bindresvport() uses two static variables port and startport which are not
protected. It is not safe when in multithread circumstance.

bindresvport() select a port number from the range 512 to 1023, when in
multithread circumstance, the port may be 1024. So the static variables will be
protected.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
ChangeLog
NEWS
sunrpc/bindrsvprt.c