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