Author: br Date: Tue Nov 22 18:31:43 2016 New Revision: 309018 URL: https://svnweb.freebsd.org/changeset/base/309018
Log: Revert r306186 ("Adjust the sopt_val pointer on bigendian systems"). This logic doesn't work with bigger sopt_valsize (e.g. when ipfw passing 2048 bytes rule). Reported by: adrian Sponsored by: DARPA, AFRL Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Nov 22 18:13:46 2016 (r309017) +++ head/sys/kern/uipc_socket.c Tue Nov 22 18:31:43 2016 (r309018) @@ -2455,12 +2455,8 @@ sooptcopyin(struct sockopt *sopt, void * */ if ((valsize = sopt->sopt_valsize) < minlen) return EINVAL; - if (valsize > len) { -#if _BYTE_ORDER == _BIG_ENDIAN - sopt->sopt_val = (void *)((uintptr_t)sopt->sopt_val + (valsize - len)); -#endif + if (valsize > len) sopt->sopt_valsize = valsize = len; - } if (sopt->sopt_td != NULL) return (copyin(sopt->sopt_val, buf, valsize)); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"