Merge pull request #171 from liyang1009/master
fix bug about stack corrupt for example ip address is spceial ip 172.16.107.7, Proxy:False, 210.3.213.69
This commit is contained in:
commit
5acd1bcc47
|
|
@ -401,12 +401,12 @@ IP2R_API uint_t ip2long(const char *ip)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( i > 3 ) {
|
||||
ipval = 0;
|
||||
break;
|
||||
}
|
||||
if ( *cs == '.' ) {
|
||||
//single part length limit
|
||||
if ( i > 3 ) {
|
||||
ipval = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( p < 0 ) break;
|
||||
buffer[i] = '\0';
|
||||
|
|
|
|||
Loading…
Reference in New Issue