bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] removing asctime_r, ctime_r from the time_r module


From: Bruno Haible
Subject: Re: [bug-gnulib] removing asctime_r, ctime_r from the time_r module
Date: Mon, 24 Apr 2006 14:12:10 +0200
User-agent: KMail/1.5

Paul Eggert wrote on 2006-03-10:
> I recently redisovered the fact that asctime_r and ctime_r, like
> asctime and ctime, are unsafe functions in the same sense that gets is
> unsafe: they can overrun their output buffers and there's no simple
> way for the user to detect in advance whether this will happen.  So
> GNU apps shouldn't use these functions, and I propose that we remove
> these function emulations from gnulib, as follows.  Any objections?

Unlike gets() and the termcap functions, these functions don't need a buffer
of arbitrary size. Only the initially specified size was too small. The
functions would be OK to use in GNU programs if a buffer of size 100 was
used rather than a buffer of size 26, no?

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]