mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
when we added orport= to the dirserver line, we started
freeing the string in the middle. this was probably xiando's crash bug. svn:r9265
This commit is contained in:
parent
7b88380690
commit
466650aa14
@ -3365,10 +3365,11 @@ parse_dir_server_line(const char *line, int validate_only)
|
||||
is_v2_authority = 0;
|
||||
} else if (!strcasecmpstart(flag, "orport=")) {
|
||||
int ok;
|
||||
flag += strlen("orport=");
|
||||
or_port = (uint16_t) tor_parse_long(flag, 10, 1, 65535, &ok, NULL);
|
||||
char *portstring = flag + strlen("orport=");
|
||||
or_port = (uint16_t) tor_parse_long(portstring, 10, 1, 65535, &ok, NULL);
|
||||
if (!ok)
|
||||
log_warn(LD_CONFIG, "Invalid orport '%s' on DirServer line.", flag);
|
||||
log_warn(LD_CONFIG, "Invalid orport '%s' on DirServer line.",
|
||||
portstring);
|
||||
} else {
|
||||
log_warn(LD_CONFIG, "Unrecognized flag '%s' on DirServer line",
|
||||
flag);
|
||||
|
Loading…
Reference in New Issue
Block a user