1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00
freebsd/contrib
Ruslan Ermilov 40e7fc1a20 More potential buffer overflow fixes.
o Fixed `nfrontp' calculations in output_data().  If `remaining' is
  initially zero, it was possible for `nfrontp' to be decremented.

Noticed by:	dillon

o Replaced leaking writenet() with output_datalen():

:  * writenet
:  *
:  * Just a handy little function to write a bit of raw data to the net.
:  * It will force a transmit of the buffer if necessary
:  *
:  * arguments
:  *    ptr - A pointer to a character string to write
:  *    len - How many bytes to write
:  */
: 	void
: writenet(ptr, len)
: 	register unsigned char *ptr;
: 	register int len;
: {
: 	/* flush buffer if no room for new data) */
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: 	if ((&netobuf[BUFSIZ] - nfrontp) < len) {
: 		/* if this fails, don't worry, buffer is a little big */
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: 		netflush();
: 	}
:
: 	memmove(nfrontp, ptr, len);
: 	nfrontp += len;
:
: }  /* end of writenet */

What an irony!  :-)

o Optimized output_datalen() a bit.
2001-07-20 12:02:30 +00:00
..
amd mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 10:42:19 +00:00
awk
bc Fixed warning: 2001-07-12 07:35:06 +00:00
bind
binutils This merges in the changes from the 2.11.2 release to the FSF anoncvs 2001-07-20 03:48:47 +00:00
bzip2 Virgin import (trimmed) of Bzip2 version 1.0.1. 2001-06-21 18:37:17 +00:00
com_err
cpio
cvs
diff
file
gcc libiberty file list for the 11-July-2000 import. 2001-07-12 19:03:33 +00:00
gdb
gperf
groff This commit was generated by cvs2svn to compensate for changes in r79847, 2001-07-18 06:48:31 +00:00
ipfilter Removed duplicate copies of files already present in sys/contrib/ipfilter. 2001-06-18 15:54:04 +00:00
isc-dhcp Connect std{in,out,err} to *something* so that "hooks" scripts that write 2001-07-16 01:56:48 +00:00
less
libf2c
libgmp
libio
libobjc
libpam Fix libpam's linker set stuff to use the new API (unbreak world), and get 2001-06-14 01:13:30 +00:00
libpcap
libreadline
libstdc++
lukemftp Import of LukeM's ftp client, version 1.5. 2001-07-19 16:26:14 +00:00
lukemftpd Import of LukeM's ftpd version 1.1. 2001-07-19 16:25:08 +00:00
ncurses
ntp
nvi Fix an underflow resulting from the assumption !O_ISSET(sp, O_LEFTRIGHT) 2001-07-19 11:02:11 +00:00
opie Fix SHA1 hashing. 2001-07-14 08:30:54 +00:00
patch
perl5
pnpinfo
sendmail This page is in man(7) format. 2001-07-13 08:06:08 +00:00
tcp_wrappers Unbreak "paranoid" host checking, which was broken with the IPv6 code 2001-07-04 20:16:18 +00:00
tcpdump
tcsh
telnet More potential buffer overflow fixes. 2001-07-20 12:02:30 +00:00
texinfo
top
traceroute Fetch the default maximum TTL value from the net.inet.ip.ttl MIB. 2001-06-06 16:12:59 +00:00