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