Skip to content
This repository was archived by the owner on Jul 15, 2018. It is now read-only.

PubKeyFromBytes: return zero value PubKey on error #49

Merged
merged 1 commit into from
Nov 6, 2017

Conversation

odeke-em
Copy link
Contributor

Fixes #48.

This previously skewed up my fuzzing tests so ensure
that on error we return the zero value PubKey.

Fixes #48.

This previously skewed up my fuzzing tests so ensure
that on error we return the zero value PubKey.
@ebuchman
Copy link
Contributor

What was the behaviour before? A partially filled pubkey ?!

@odeke-em
Copy link
Contributor Author

A zero filled innerPubKey inner: crypto.PubKeySecp256k1{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} as exhibited with the program at #48

@ebuchman
Copy link
Contributor

ebuchman commented Nov 6, 2017

Thanks @odeke-em

@ebuchman ebuchman merged commit b4f04f1 into develop Nov 6, 2017
@ebuchman ebuchman deleted the pubKey-invalid-data-returns-empty-pubKey branch November 6, 2017 19:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants