Skip to content

Commit

Permalink
Fixed uninit len for th_contact_encode_passwd param.
Browse files Browse the repository at this point in the history
As the used len was all the time 10 (the len of the default passwd), if you have set a shorter one, the actual used passwd has some trailing memory garbage (up to 10 char len). This grabage could be (99.999%) constant during runtime, but 100% different after a restart. Shorly, the decoding on ongoing contact would have failed after a restart.

(cherry picked from commit 4a17a82)
  • Loading branch information
bogdan-iancu committed Feb 2, 2019
1 parent 9b8b28c commit 9f3e477
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/topology_hiding/topology_hiding.c
Expand Up @@ -127,6 +127,7 @@ static int mod_init(void)
topo_hiding_prefix.len = strlen(topo_hiding_prefix.s);
topo_hiding_seed.len = strlen(topo_hiding_seed.s);
th_contact_encode_param.len = strlen(th_contact_encode_param.s);
topo_hiding_ct_encode_pw.len = strlen(topo_hiding_ct_encode_pw.s);
if (topo_hiding_ct_params.s) {
topo_hiding_ct_params.len = strlen(topo_hiding_ct_params.s);
topo_parse_passed_ct_params(&topo_hiding_ct_params);
Expand Down

0 comments on commit 9f3e477

Please sign in to comment.