miniupnpd.c: comments in parselanaddr()

This commit is contained in:
Thomas Bernard 2014-02-03 10:44:24 +01:00
parent 49780a99ea
commit 18db1145ea
1 changed files with 2 additions and 0 deletions

View File

@ -586,6 +586,7 @@ parselanaddr(struct lan_addr_s * lan_addr, const char * str)
p++;
if(*p=='.')
{
/* parse mask in /255.255.255.0 format */
while(*p && (*p=='.' || isdigit(*p)))
p++;
n = p - q;
@ -598,6 +599,7 @@ parselanaddr(struct lan_addr_s * lan_addr, const char * str)
}
else
{
/* it is a /24 format */
int nbits = atoi(q);
if(nbits > 32 || nbits < 0)
goto parselan_error;