Commit Graph

15 Commits

Author SHA1 Message Date
archie
dcdc1187e3 Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
phk
b1d651e9b4 Nitpicking and dusting performed on a train. Removes trivial warnings
about unused variables, labels and other lint.
1998-10-25 17:44:59 +00:00
dfr
92449ad5fa This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
eivind
86354cd8fc Staticize. 1998-02-09 06:11:36 +00:00
eivind
15aa079292 Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00
eivind
d8f3bc5b0e Turn DIAGNOSTIC into a new-style option. 1998-02-04 22:34:03 +00:00
bde
7bc1dce414 Fixed a sloppy common-style declaration.
natm_pcb.c:
Include <sys/socketvar.h> which will be used when M_PCB is declared
in the right place.
1997-12-20 00:13:51 +00:00
bde
0ba390293e Removed unused #includes. 1997-10-28 15:59:26 +00:00
phk
d38c0e3213 Last major round (Unless Bruce thinks of somthing :-) of malloc changes.
Distribute all but the most fundamental malloc types.  This time I also
remembered the trick to making things static:  Put "static" in front of
them.

A couple of finer points by:	bde
1997-10-12 20:26:33 +00:00
peter
47e0f3fbb0 Update network code to use poll support. 1997-09-14 03:10:42 +00:00
bde
2cf5cf3752 Added used #include - don't depend on <sys/mbuf.h> including
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
1997-09-02 01:19:47 +00:00
wollman
c07b59bf2b Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs.  (Socket buffers are the one exception.)  A number
of kernel APIs needed to get fixed in order to make this happen.  Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead.  Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
1997-08-16 19:16:27 +00:00
bde
2b60d80b5b Removed unused #includes. 1997-08-02 14:33:27 +00:00
kjc
8e54e74c3d import Chuck Cranor's ATM driver 1997-05-09 08:04:59 +00:00
kjc
c9ad0dc89a import Chuck Cranor's ATM driver 1997-05-09 07:48:14 +00:00