diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-08-24 15:49:37 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-08-24 15:49:37 +0000 |
| commit | b062d4514f8dd3fe9887fa6ca93e03f54165f446 (patch) | |
| tree | 3937cd09594dcf4a9a62e15ea6c8ee209a712f5c /sys/compat/linux | |
| parent | 33c9aed1b2ecbbdcf04581d27501d6b320ee6f2d (diff) | |
Notes
Diffstat (limited to 'sys/compat/linux')
| -rw-r--r-- | sys/compat/linux/linux_socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 9b52849cd40f..e3b369a22660 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -729,6 +729,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) |
