Skip to content

Fix private underflow#1470

Merged
jacqueswww merged 7 commits into
vyperlang:masterfrom
charles-cooper:fix_private_underflow
Jun 6, 2019
Merged

Fix private underflow#1470
jacqueswww merged 7 commits into
vyperlang:masterfrom
charles-cooper:fix_private_underflow

Conversation

@charles-cooper

Copy link
Copy Markdown
Member

What I did

Fix #1463

How I did it

The dynamic section copier skipped null elements in case there was a difference between len(array) and maxlen(array) since elements past-the-end of memory are null. However, that could fail if the array length was nonzero but it had null elements. This fixes the dynamic section copier by explicitly using the length specified in the ABI encoding for byte arrays.

How to verify it

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@jacqueswww

jacqueswww commented Jun 5, 2019

Copy link
Copy Markdown
Contributor

Appropriate 'cute' image, figuring this out was a challenge indeed! 👅

@jacqueswww

Copy link
Copy Markdown
Contributor

Great stuff!

@jacqueswww jacqueswww merged commit a072741 into vyperlang:master Jun 6, 2019
@charles-cooper charles-cooper deleted the fix_private_underflow branch September 24, 2019 11:49
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.

Fails: Using empty bytes[256] default function parameter on internal constant and private functions

2 participants