Re: [Lit.] Buffer overruns

From: Mok-Kong Shen (mok-kong.shen_at_t-online.de)
Date: 01/29/05


Date: Sat, 29 Jan 2005 00:32:42 +0100


Trevor L. Jackson, III wrote:

> Phil Carmody wrote:
>

>> I don't know if the intent was malicious, but I've see both of these
>> before #includes:
>>
>> #define const
>> #define private public // OK, not C, but you get the idea
>>
>> Some things are almost impossible to defend against.
>
>
> Those symbols are defensible. Just #define them.

You are largely but not entirely right, I am afraid. You
apparently assumed that detection of such matters could
be perfect, which often may not be the case in practice,
particularly if the software is of significant size.
I suppose it is barely possible to eradicate all errors
(either due to neligence/mistakes or due to intended
malicious acts), just like one couldn't eradicate all
drug traffic and abuses in the world. On the other hand,
taking sufficient measures (all practically feasible
ones in one's given environment) in defensive (perhaps
even proactive?) error prevention/recovery is certainly
a worthwhile/necessary goal to be achieved for all
safety critical applications.

M. K. Shen


Quantcast