forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pull_length: Take structure size into account when checking max
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.
- Loading branch information
1 parent
8e9bb39
commit 4b38696
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters