This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Newbie problem: Address out of bounds
- From: Andre Kirchner <sieg1974 at yahoo dot com>
- To: Eljay Love-Jensen <eljay at adobe dot com>, gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Sep 2003 22:59:04 -0700 (PDT)
- Subject: Re: Newbie problem: Address out of bounds
Hi Eljay,
that was exactly what was happining with therLine at
getLine.
Thanks for your help,
Andre
--- Eljay Love-Jensen <eljay@adobe.com> wrote:
> Hi Andre,
>
> Does getLine '\0' terminate the line?
>
> Does getLine assure that not to overrun the
> theLine's buffer size, including the terminator?
> (And, if so, how does getLine know how big theLine's
> buffer is?)
>
> The bzero function is rather non-portable, as it is
> not a required part of ANSI or System V. (I think
> that harkens back to the days of BCPL.) A portable
> alternative is memset(ptr, 0x00, 256); instead.
>
> HTH,
> --Eljay
>
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com