mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-12 13:43:36 +01:00
Merge branch 'maint-0.2.6' into release-0.2.6
This commit is contained in:
commit
0978889563
3
changes/bug22490
Normal file
3
changes/bug22490
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor bugfixes (correctness):
|
||||||
|
- Avoid undefined behavior when parsing IPv6 entries from the geoip6
|
||||||
|
file. Fixes bug 22490; bugfix on 0.2.4.6-alpha.
|
@ -145,6 +145,7 @@ geoip_parse_entry(const char *line, sa_family_t family)
|
|||||||
if (*line == '#')
|
if (*line == '#')
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
char buf[512];
|
||||||
if (family == AF_INET) {
|
if (family == AF_INET) {
|
||||||
unsigned int low, high;
|
unsigned int low, high;
|
||||||
if (tor_sscanf(line,"%u,%u,%2s", &low, &high, c) == 3 ||
|
if (tor_sscanf(line,"%u,%u,%2s", &low, &high, c) == 3 ||
|
||||||
@ -155,7 +156,6 @@ geoip_parse_entry(const char *line, sa_family_t family)
|
|||||||
goto fail;
|
goto fail;
|
||||||
country = c;
|
country = c;
|
||||||
} else { /* AF_INET6 */
|
} else { /* AF_INET6 */
|
||||||
char buf[512];
|
|
||||||
char *low_str, *high_str;
|
char *low_str, *high_str;
|
||||||
struct in6_addr low, high;
|
struct in6_addr low, high;
|
||||||
char *strtok_state;
|
char *strtok_state;
|
||||||
|
Loading…
Reference in New Issue
Block a user