mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
4b38696613
When a serialized length refers to an array of structures, the trivial DOS prevention can be out by a factor of sizeof(serialized struct). Use the size of the serialized structure as a multiplier to prevent this. Transaction inputs are the motivating example, where the check is out by a factor of ~40. |
||
---|---|---|
.. | ||
test | ||
address.h | ||
base58.c | ||
base58.h | ||
block.c | ||
block.h | ||
chainparams.c | ||
chainparams.h | ||
locktime.c | ||
locktime.h | ||
Makefile | ||
preimage.h | ||
privkey.h | ||
pubkey.c | ||
pubkey.h | ||
pullpush.c | ||
pullpush.h | ||
README | ||
script.c | ||
script.h | ||
shadouble.c | ||
shadouble.h | ||
short_channel_id.c | ||
short_channel_id.h | ||
signature.c | ||
signature.h | ||
tx.c | ||
tx.h | ||
varint.c | ||
varint.h |
These are standard bitcoin manipulation routines which should be provided by any normal bitcoin library in whatever language you choose. The ones here are standalone ones taken from bitcoin core and some I wrote, many taken from bitcoin-iterate and pasted in here.