Re: sprintf security holes?

From: Sven Verdoolaege <skimo@kotnet.org>
Date: 2005-09-19 22:42:22
On Mon, Sep 19, 2005 at 12:42:08AM -0700, Junio C Hamano wrote:
> We _might_ be protected from buffer overrun errors [*1*], but we
> would then end up operating on a truncated data -- which would
> lead to an equally unexpected behaviour.  I do not think there
> is any guarantee that working with unexpectedly truncated data
> leads to less severe security problems than buffer overruns with
> careless sprintf().

But you can _check_ whether the data has been truncated.
Just look at the return value of snprintf.

skimo
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Sep 19 22:43:13 2005

This archive was generated by hypermail 2.1.8 : 2005-09-19 22:43:15 EST