Date: Sat, 23 Sep 2006 10:23:08 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 106543 for review Message-ID: <200609231023.k8NAN876046896@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106543 Change 106543 by rdivacky@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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609231023.k8NAN876046896>