[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: off-by-one error in realpath(3)
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Re: off-by-one error in realpath(3)
- From: William Ahern <william_(_at_)_25thandClement_(_dot_)_com>
- Date: Mon, 4 Aug 2003 10:16:15 -0700
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
Visit your host, monkey.org