Re: Newbie problem: Address out of bounds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux