Default values for some options apparently not initialised

Christopher Key cjk32
Fri Jul 30 17:05:32 PDT 2010

On 30 Jul 2010, at 19:24, Jouni Malinen <j at> wrote:

> On Fri, Jul 30, 2010 at 06:50:31PM +0100, Christopher Key wrote:
>> A casual glance shows that wpa_strict_rekey and wpa_ptk_rekey members of 
>> `struct hostapd_bss_config' don't get initialised (see 
>> hostapd_config_defaults_bss()); there may well be others.  I guess that 
>> the memory coming back from malloc is zeroed on most platforms, 
>> defaulting these two options to off, but relying on this seems dangerous 
>> at best.  This affects 0.7.2.
> struct hostapd_bss_config is allocated with os_zalloc() which fills the
> memory with 0x00. As such, these variables are initialized.
I should have looked more closely; sorry for the noise.

Kind regards,

Christopher Key

More information about the Hostap mailing list