Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ZerXes
Tor
Commits
99db996a
Commit
99db996a
authored
Dec 03, 2003
by
Roger Dingledine
Browse files
stop segfault when choose_good_exit_server returns NULL
svn:r879
parent
5a894a15
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/or/onion.c
View file @
99db996a
...
...
@@ -386,14 +386,18 @@ cpath_build_state_t *onion_new_cpath_build_state(void) {
directory_t
*
dir
;
int
r
;
cpath_build_state_t
*
info
;
routerinfo_t
*
exit
;
router_get_directory
(
&
dir
);
r
=
new_route_len
(
options
.
PathlenCoinWeight
,
dir
->
routers
,
dir
->
n_routers
);
if
(
r
<
0
)
return
NULL
;
exit
=
choose_good_exit_server
(
dir
);
if
(
!
exit
)
return
NULL
;
info
=
tor_malloc
(
sizeof
(
cpath_build_state_t
));
info
->
desired_path_len
=
r
;
info
->
chosen_exit
=
tor_strdup
(
choose_good_exit_server
(
dir
)
->
nickname
);
info
->
chosen_exit
=
tor_strdup
(
exit
->
nickname
);
return
info
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment