On Fri, 2013-11-29 at 10:00 +0100, Daniel Wagner wrote:
> >> @@ -850,7 +850,7 @@ const char 
> >> *g_supplicant_network_get_security(GSupplicantNetwork *network)
> >>   const void *g_supplicant_network_get_ssid(GSupplicantNetwork *network,
> >>                                              unsigned int *ssid_len)
> >>   {
> >> -    if (!network || !network->ssid) {
> >> +    if (!network || network->ssid[0] == '\0') {
> >>              *ssid_len = 0;
> >>              return NULL;
> >>      }
> >
> > An SSID can contain 0x00 as it's first character, so the current code is
> > correct.
> 
> !network->ssid is always false since ssid is an array. Sound like we should
> do the same as above, no?

Indeed. Thought that network->ssid was a pointer but in fact it's an
array. Same treatment as above.

> > It's an byte array in Agent API and can be specified as a hex
> > string in the config file.
> 
> I don't follow here.

An SSID is an array of bytes that can have any value, even 0x00. So the
only evidence for its existence is length != 0.

Cheers,

        Patrik



_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to