Re: problem with GNU C
Ilya Teterin writes:
> Thanks again ;) But it isn't a competition "found as much bugs as
> possible"... No one of described bugs can be a reason for such
> strange behaviour. Are you really believe that program crashed
> because the length of one string was equal (not less and not
> greater) than 1024? Additionally, I believe that even if it occurs,
> it will not crash the program...
You are invoking undefined behaviour; there are simply no guarantees
about what happens in such situations.
And yes, a single byte may be enough to crash a program. Indeed I
think I recall a BUGTRAQ posting where someone managed to exploit a
security hole with a single byte overrun.
My advice is to fix the obvious bugs - all of them - before even
thinking about nonobvious ones.
ttfn/rjk
Reply to: