mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
Avoid writing uninitialized value data->realm in serialize_hop_data(...) (via create_onionpacket(...))
This commit is contained in:
parent
84dd65485c
commit
f84828be36
@ -369,6 +369,7 @@ struct onionpacket *create_onionpacket(
|
|||||||
|
|
||||||
for (i = num_hops - 1; i >= 0; i--) {
|
for (i = num_hops - 1; i >= 0; i--) {
|
||||||
memcpy(hops_data[i].hmac, nexthmac, SECURITY_PARAMETER);
|
memcpy(hops_data[i].hmac, nexthmac, SECURITY_PARAMETER);
|
||||||
|
hops_data[i].realm = 0;
|
||||||
generate_key_set(params[i].secret, &keys);
|
generate_key_set(params[i].secret, &keys);
|
||||||
generate_cipher_stream(stream, keys.rho, ROUTING_INFO_SIZE);
|
generate_cipher_stream(stream, keys.rho, ROUTING_INFO_SIZE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user