Quoting David Hawkins <dwh@...>:
> dsidlauskas1 wrote:
>> Consider the following code:
>>
>> ============================
>> char buf[]={1,2,3,4,5,6,7,8};
>> int *ip, x[4];
>>
>> for (i=0; i<4; i++)
>> {
>> ip = (int *)&buf[i];
>> x[4] = *ip;
>> }
>
> Er, given the fact that x is of length 4,
> the statement x[4] = *ip is actually out-of-bounds.
Doh! Also a problem.Message
Re: [lpc2000] For C Experts
2006-03-30 by Robert Adsett