Skip to content

Commit

Permalink
Avoid writing uninitialized value data->realm in serialize_hop_data(.…
Browse files Browse the repository at this point in the history
…..) (via create_onionpacket(...))
  • Loading branch information
practicalswift authored and cdecker committed Dec 28, 2017
1 parent 84dd654 commit f84828b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/sphinx.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ struct onionpacket *create_onionpacket(

for (i = num_hops - 1; i >= 0; i--) {
memcpy(hops_data[i].hmac, nexthmac, SECURITY_PARAMETER);
hops_data[i].realm = 0;
generate_key_set(params[i].secret, &keys);
generate_cipher_stream(stream, keys.rho, ROUTING_INFO_SIZE);

Expand Down

0 comments on commit f84828b

Please sign in to comment.