use proper unsigned type for ESSID length

This commit is contained in:
Michael Stapelberg 2015-09-25 10:49:14 +02:00
parent 45ccd84309
commit b8b07511b1

View File

@ -125,7 +125,7 @@ static void find_ssid(uint8_t *ies, uint32_t ies_len, uint8_t **ssid, uint32_t *
}
if (ies_len < 2)
return;
if (ies_len < 2 + ies[1])
if (ies_len < 2 + (uint8_t)ies[1])
return;
*ssid_len = ies[1];