upnphttp: Don't select an empty interface address
When determining which address to present to the client for a resource URL, we should never use an empty string.
This commit is contained in:
parent
ad5d6413a7
commit
782e99873a
@ -268,14 +268,14 @@ ParseHttpHeaders(struct upnphttp * h)
|
||||
p = colon + 1;
|
||||
while(isspace(*p))
|
||||
p++;
|
||||
for(n = 0; n<n_lan_addr; n++)
|
||||
for(n = 0; n < n_lan_addr+1; n++)
|
||||
{
|
||||
for(i=0; lan_addr[n].str[i]; i++)
|
||||
for(i = 0; lan_addr[n].str[i]; i++)
|
||||
{
|
||||
if(lan_addr[n].str[i] != p[i])
|
||||
break;
|
||||
}
|
||||
if(!lan_addr[n].str[i])
|
||||
if(i && !lan_addr[n].str[i])
|
||||
{
|
||||
h->iface = n;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user