Retern more appropriate errno when Linux path name is too long.
This commit is contained in:
parent
cf76cae978
commit
55a4bbebe3
@ -158,7 +158,7 @@ linux_getsockaddr(struct sockaddr **sap, const struct osockaddr *osa, int osalen
|
||||
namelen = strnlen(((struct sockaddr_un *)kosa)->sun_path,
|
||||
osalen - hdrlen);
|
||||
if (hdrlen + namelen > sizeof(struct sockaddr_un)) {
|
||||
error = EINVAL;
|
||||
error = ENAMETOOLONG;
|
||||
goto out;
|
||||
}
|
||||
alloclen = sizeof(struct sockaddr_un);
|
||||
|
Loading…
Reference in New Issue
Block a user