Linuxulator getpeername() returns EINVAL in case then namelen less then 0.
MFC after: 2 weeks
This commit is contained in:
parent
adbb25df4b
commit
caaad8736e
@ -722,6 +722,8 @@ linux_getpeername(struct thread *td, struct linux_getpeername_args *args)
|
||||
error = copyin(PTRIN(args->namelen), &len, sizeof(len));
|
||||
if (error != 0)
|
||||
return (error);
|
||||
if (len < 0)
|
||||
return (EINVAL);
|
||||
|
||||
error = kern_getpeername(td, args->s, &sa, &len);
|
||||
if (error != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user