Re: [PATCH] fix two bugs in lib/vsprintf.c

Roland Dreier (roland@digitalvampire.org)
15 Jan 2002 16:54:57 -0800


>>>>> "Michal" == Michal Jaegermann <michal@harddata.com> writes:

Michal> On Tue, Jan 15, 2002 at 01:25:38AM -0800, Roland Dreier wrote:
Roland> The below patch fixes two bugs in lib/vsprintf.c's
Roland> implementation of vsscanf().

Michal> If we are looking at these things I have some gnawing
Michal> suspicions that a constant 0xFFFFFFFFUL at line 489 of
Michal> lib/vsprintf.c in this function:

int vsprintf(char *buf, const char *fmt, va_list args)
{
return vsnprintf(buf, 0xFFFFFFFFUL, fmt, args);
}

Michal> was really meant to be (size_t)(-1). It is not the same
Michal> if a platform is not 32 bits. Roland, what do you think?

You are probably right, although I can't see it making much practical
difference (unlike the bugs I fixed, which actually bit me :) Still,
it wouldn't hurt to fix it.

R.

-- 
Roland Dreier                                <roland@digitalvampire.org>
GPG Key fingerprint = A89F B5E9 C185 F34D BD50  4009 37E2 25CC E0EE FAC0
-
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/