SSID len bug

Chris Zimmermann cbzimmermann
Fri Sep 8 12:54:52 PDT 2006


I'm using hostapd v0.5.5 and found, what appears to be, a minor bug  
regarding SSID length.

In config.c, hostapd_config_read(), the check for SSID length is as  
follows:

			if (bss->ssid.ssid_len >= HOSTAPD_MAX_SSID_LEN ||
			    bss->ssid.ssid_len < 1) {

But in config.h, part of struct hostapd_ssid, the following exists:

	char ssid[HOSTAPD_MAX_SSID_LEN + 1];

where HOSTAPD_MAX_SSID_LEN is defined as follows

	#define HOSTAPD_MAX_SSID_LEN 32

Since SSIDs can be up to and including 32 bytes, the check in  
hostapd_config_read() should be "greater than" not "greater than or  
equal to",  like this:

			if (bss->ssid.ssid_len > HOSTAPD_MAX_SSID_LEN ||
			    bss->ssid.ssid_len < 1) {

Unless I'm missing something?

Thanks,
Chris

-- 
Chris Zimmermann
cbzimmermann at mac.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20060908/83744b88/attachment.htm 



More information about the Hostap mailing list