Skip to content

add check for daglen exaggeration - #350

Open
stringhandler wants to merge 1 commit into
BlockstreamResearch:masterfrom
stringhandler:st-fix-dag-alloc
Open

stringhandler wants to merge 1 commit into
BlockstreamResearch:masterfrom
stringhandler:st-fix-dag-alloc

Conversation

@stringhandler

Copy link
Copy Markdown

When decoding a simplicity program, the dag length is read first. Currently, we allocate memory according to that length without checking whether the program is actually that long. This could be used to allocate more memory than needed. Here we add a check that the length of the DAG on stream is within the size of that length before allocating.

When decoding a simplicity program, the dag length is read first. Currently, we 
allocate memory according to that length without checking whether the program 
is actually that long. This could be used to allocate more memory than needed.
Here we add a check that the length of the DAG on stream is within the size of 
that length before allocating.
@stringhandler

Copy link
Copy Markdown
Author

Related to #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant