Date: Sun, 6 Jan 2002 22:28:08 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mike Silbersack <silby@FreeBSD.org> Cc: <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/kern uipc_socket2.c Message-ID: <20020106222133.H3630-100000@gamplex.bde.org> In-Reply-To: <200201060650.g066osD48043@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 5 Jan 2002, Mike Silbersack wrote: > silby 2002/01/05 22:50:54 PST > > Modified files: > sys/kern uipc_socket2.c > Log: > Reorder a calculation in sbreserve so that it does not overflow > with multi-megabyte socket buffer sizes. > > PR: 7420 > MFC after: 3 weeks > > Revision Changes Path > 1.81 +3 -1 src/sys/kern/uipc_socket2.c Er, this was already fixed (mostly better) in rev.1.19. Quad arithmetic is used to inhibit overflow. Overflow can only occur for multi-gigabyte buffer sizes which can only even occur in theory on machines with u_long larger than 32 bits (since sb_max has type u_long). But sb_max's larger than UINT_MAX cause bugs in sbreserve anyway, since the wrong min() function is used for limiting sb->sb_max to sb_max. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020106222133.H3630-100000>