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

Re: Buffer Overflows (was Re: (no subject))



On 27 Apr 2000, Oleg Goldshmidt wrote:

> > If you must code in C, at least use the safe routines in glib (for
> > example g_strdup_sprintf) rather then using unsafe functions such as
> > sprintf.
> 
> This might be not feasible if you need to write portable code
> (nor will be snprintf(), which is non-standard, IIRC). You need
> to get into the habit of putting checks in your code to prevent
> buffer overflows.

To reiterate my point: use glib instead of libc. Glib is *very* portable.
-- 
Moshe Zadka <mzadka@geocities.com>. 
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il