mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
common/sphinx: use bigsize_get not varint_get.
These are not the same if it's more than one byte. Testing would have caught this, I assume. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -486,7 +486,7 @@ static void sphinx_parse_payload(struct route_step *step, const u8 *src)
|
||||
hop_size = FRAME_SIZE;
|
||||
step->type = SPHINX_V0_PAYLOAD;
|
||||
} else {
|
||||
vsize = varint_get(src, 3, &raw_size);
|
||||
vsize = bigsize_get(src, 3, &raw_size);
|
||||
hop_size = raw_size + vsize + HMAC_SIZE;
|
||||
step->type = SPHINX_TLV_PAYLOAD;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user