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

Re: off-by-one error in realpath(3)

On Mon, Aug 04, 2003 at 10:41:22AM -0600, Todd C. Miller wrote:
> An off-by-one error exists in the C library function realpath(3).
> This is the same bug that was recently found in the wu-ftpd ftpd
> server by Janusz Niewiadomski and Janusz Niewiadomski.

Why isn't snprintf() used more often? It seems to me that it is less
error prone to use snprintf() then to do your copying and length
calculations separately.

- Bill