PERFORCE change 106543 for review
Roman Divacky
rdivacky at FreeBSD.org
Sat Sep 23 03:23:13 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106543
Change 106543 by rdivacky at rdivacky_witten on 2006/09/23 10:22:21
Return EINVAL instead of EFAULT when namelen is not correct.
Affected files ...
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_socket.c#6 edit
Differences ...
==== //depot/projects/linuxolator/src/sys/compat/linux/linux_socket.c#6 (text+ko) ====
@@ -723,8 +723,11 @@
bsd_args.anamelen = PTRIN(linux_args.namelen);/* XXX */
error = accept(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.name);
- if (error)
+ if (error) {
+ if (error == EFAULT && linux_args.namelen != sizeof(struct sockaddr_in))
+ return (EINVAL);
return (error);
+ }
if (linux_args.addr) {
error = linux_sa_put(PTRIN(linux_args.addr));
if (error) {
More information about the p4-projects
mailing list