North American Network Operators Group

Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical

Re: Bell Labs or Microsoft security?

  • From: E.B. Dreger
  • Date: Wed Jan 29 14:43:18 2003

ML> Date: Wed, 29 Jan 2003 11:07:59 -0800
ML> From: Mathew Lodge


ML> It doesn't have to be, if your compiler is worth its salt.
ML> Take a look at the GNU Ada compiler implementation of bound
ML> checking -- incredibly efficient.

s/compiler/programmer/

How about:

	struct buf_t {
		char *first ;
		char *cur ;
		char *last ;
		size_t size ;
		size_t remaining ;
	} ;

	/* implement various buf-management macros */

Implement some or all, as needed.  Replace the char* elements
with a union of various ptr types if desired.  Keep the type
definition available; there's no need for an opaque struct.

Now write programs to toss around buf_t* instead of char*.  It's
not that difficult.


Eddy
--
Brotsman & Dreger, Inc. - EverQuick Internet Division
Bandwidth, consulting, e-commerce, hosting, and network building
Phone: +1 (785) 865-5885 Lawrence and [inter]national
Phone: +1 (316) 794-8922 Wichita

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Date: Mon, 21 May 2001 11:23:58 +0000 (GMT)
From: A Trap <[email protected]>
To: [email protected]
Subject: Please ignore this portion of my mail signature.

These last few lines are a trap for address-harvesting spambots.
Do NOT send mail to <[email protected]>, or you are likely to
be blocked.