Skip to content

Fix zero address transfer bug#151

Merged
andrew-fleming merged 3 commits intoOpenZeppelin:mainfrom
andrew-fleming:fix-zero-address-transfers
Jan 21, 2022
Merged

Fix zero address transfer bug#151
andrew-fleming merged 3 commits intoOpenZeppelin:mainfrom
andrew-fleming:fix-zero-address-transfers

Conversation

@andrew-fleming
Copy link
Copy Markdown
Collaborator

Fixes #148.

let (caller) = get_caller_address()
let (is_approved) = _is_approved_or_owner(caller, token_id)
assert is_approved = 1
assert_not_zero(caller * is_approved)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comments to non obvious lines

@andrew-fleming andrew-fleming merged commit e9a7008 into OpenZeppelin:main Jan 21, 2022
@andrew-fleming andrew-fleming deleted the fix-zero-address-transfers branch January 21, 2022 21:50
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.

ERC721_transferFrom and ERC721_safeTransferFrom allow improper transfer of tokens

2 participants