Re: is there small mistake in lib/vsprintf.c of kernel 2.4.20 ?

Jonathan Lundell (linux@lundell-bros.com)
Fri, 2 May 2003 09:52:30 -0700


At 11:27am -0400 5/2/03, Richard B. Johnson wrote:
>If your conversion chances the base to 0, you divide by 0 (not
>good) and don't get a remainder. Actually procedure number()
>protects against a base less than 2 or greater than 36 so you
>just prevent conversion altogether.

A bug in number(), looks like. (base = 0) is intended to let the
input string determine the base (16 if 0x*, else 8 if 0* else 10).
Like simple_strtol().

-- 
/Jonathan Lundell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/