diwakergupta / stacks-blockchain-tob-audit

GNU General Public License v3.0
0 stars 0 forks source link

Missing calls to `check_argument_count` in `ReadOnlyChecker::check_native_function` #15

Open smoelius opened 4 years ago

smoelius commented 4 years ago

Checks are missing in at least the following three locations: https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/analysis/read_only_checker/mod.rs#L170-L171 https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/analysis/read_only_checker/mod.rs#L178-L179 https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/analysis/read_only_checker/mod.rs#L189-L190 For the first of these, the issue can be realized by changing: https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/analysis/read_only_checker/tests.rs#L9-L12 to:

         "(define-data-var foo int 1) 
          (define-private (foo-bar) 
            (at-block))",