This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]