A serious security bug... caused by no bounds checking.

Paulo Pinto pjmlp at progtools.org
Tue Apr 8 10:44:19 PDT 2014


Am 08.04.2014 19:18, schrieb Walter Bright:
> On 4/8/2014 3:55 AM, Paulo Pinto wrote:
>> On Tuesday, 8 April 2014 at 09:46:51 UTC, Walter Bright wrote:
>>> On 4/8/2014 1:47 AM, Paulo Pinto wrote:
>>>> I never got the point of not having bounds checking in C and its ilk.
>>>
>>> C hardly even has arrays.
>>
>> Yes I know, another broken design decision.
>
> Looking at C's decisions from our perspective is a bit unfair. The only
> really unforgivable one, from the perspective of the times when it was
> designed, is the one where arrays decay to pointers when passing them to
> functions. This completely defeats any attempt at detecting array
> overflows.
>
>

I don't consider unfair, because there were systems languages at the 
time like PL/I and Mesa that had bounds checking.

C designers explicitly decided against it, with the thought that 
developers would use lint alongside C, which even today very few do.

--
Paulo


More information about the Digitalmars-d mailing list