[PATCH] wpa_debug: Remove 2048 byte message length limit

Jouni Malinen j at w1.fi
Wed Feb 19 06:45:58 EST 2014


On Sat, Feb 15, 2014 at 07:08:32PM -0500, Anders Kaseorg wrote:
> diff --git a/src/utils/wpa_debug.c b/src/utils/wpa_debug.c
> @@ -596,10 +596,14 @@ void wpa_msg(void *ctx, int level, const char *fmt, ...)
> +	va_start(ap, fmt);
> +	buflen = vsnprintf(NULL, 0, fmt, ap) + 1;
> +	va_end(ap);

How portable is this? SUSv2 seems to imply that n==0 would result in
undefined behavior, so this may not work without being compliant with
C99. There are some strange targets that wpa_supplicant is used on, so
I'm not sure whether there would be enough justification for this change
if there is risk of breaking debugging on such platforms.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list