HomePhabricator

Add basic sanity checking for script pushdata size

Description

Add basic sanity checking for script pushdata size

Summary:
This allowed to uncover several errors in the json test suite.

The checking right now is rather basic, but should catch a good chunk of errors. Actually checking for size when faced with pushdata and when pushing integer literals and/or opcodes. Convertly, we should check that no push is present when no push is expected.

Depends on D1292, Relates to T327

Test Plan:

make check

Added a test for ParseScript. It's barebone for now, but at least cover the functionality added.

Reviewers: #bitcoin_abc, jasonbcox, schancel

Reviewed By: #bitcoin_abc, jasonbcox, schancel

Subscribers: matiu, schancel, jimpo, jasonbcox, teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1293

Details

Provenance
deadalnixAuthored on Apr 16 2018, 20:46
deadalnixPushed on Apr 18 2018, 23:24
Reviewer
Restricted Project
Differential Revision
D1293: Add basic sanity checking for script pushdata size
Parents
rABCdbb2998a5996: Add comment on fixing bugs to CONTRIBUTING.md
Branches
Unknown
Tags
Unknown