* fhandler_socket.cc (fhandler_socket::bind): Fix error code for
empty filename.
This commit is contained in:
parent
188fc1cf6e
commit
cf4acdbc1f
|
@ -1,3 +1,8 @@
|
|||
2013-02-04 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_socket.cc (fhandler_socket::bind): Fix error code for
|
||||
empty filename.
|
||||
|
||||
2013-02-04 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_socket.cc (fhandler_socket::bind): Fix length check of
|
||||
|
|
|
@ -906,7 +906,7 @@ fhandler_socket::bind (const struct sockaddr *name, int namelen)
|
|||
if (len <= 1 || len > UNIX_PATH_LEN
|
||||
|| !memchr (un_addr->sun_path, '\0', len))
|
||||
{
|
||||
set_errno (len < 1 ? EINVAL : ENAMETOOLONG);
|
||||
set_errno (len <= 1 ? (len == 1 ? ENOENT : EINVAL) : ENAMETOOLONG);
|
||||
goto out;
|
||||
}
|
||||
sin.sin_family = AF_INET;
|
||||
|
|
Loading…
Reference in New Issue