[PATCH] wpa_debug: Remove 2048 byte message length limit

Jouni Malinen j
Thu Feb 20 06:34:25 PST 2014


On Wed, Feb 19, 2014 at 07:09:48AM -0500, Anders Kaseorg wrote:
> On Wed, 19 Feb 2014, Jouni Malinen wrote:
> > 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.
> 
> This was corrected in SUSv3.  According to the Autoconf manual,

Fair enough, applied.

> Keep in mind that snprintf isn?t even part of C89 at all, so we have to 
> draw a line somewhere.

That's why there is a pointer to where to get an snprintf()
implementation from in src/utils/os.h.. I'm more worried about some
embedded platforms that are used with wpa_supplicant (some of which even
I'm not really aware of). Anyway, if these can fill in snprintf(), I'd
assume they can handle vsnprintf() extensions as well.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list