cosmos-sdk/codec
Emmanuel T Odeke fe8a891f11
unknownproto: check result from protowire.ConsumeFieldValue and return an error (#7770)
* unknownproto: check result from protowire.ConsumeFieldValue and return error

Given that protowire.ConsumeFieldValue returns -1 when it encounters an
error, perform a check for n < 0 and return the respectively obtained
error with context about the details.

Fixes an issue identified from a go-fuzz session, thanks to Ethan
Buchman and the IBC auditors from Informal Systems et al.

Fixes #7739.

* Address AlexanderBez's suggestions

* Use require in tests

* Add issue #7846 to TODO

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-09 17:58:13 +00:00
..
legacy rename RegisterCodec to RegisterLegacyAminoCodec (#7243) 2020-09-07 14:47:12 +00:00
types Throw an error on duplicate registration (#7729) 2020-10-29 15:32:47 +00:00
unknownproto unknownproto: check result from protowire.ConsumeFieldValue and return an error (#7770) 2020-11-09 17:58:13 +00:00
amino.go Use any as validator pubkey (#7597) 2020-10-23 12:07:52 +00:00
amino_codec.go Make JSONMarshaler methods require proto.Message (#7054) 2020-08-26 09:39:38 +00:00
amino_codec_test.go rename RegisterCodec to RegisterLegacyAminoCodec (#7243) 2020-09-07 14:47:12 +00:00
any.go Start removing HybridCodec (init + auth, bank, distribution) (#6838) 2020-07-24 19:04:29 +00:00
any_test.go Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
codec.go PubKey proto types (#7147) 2020-09-16 11:08:55 +00:00
json.go Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
proto_codec.go Wrap ProtoCodec in interface (#7637) 2020-10-27 13:53:54 +00:00
proto_codec_test.go Make JSONMarshaler methods require proto.Message (#7054) 2020-08-26 09:39:38 +00:00
yaml.go docs: Update the code.MarshalYAML docs (#7496) 2020-10-09 14:08:02 +00:00
yaml_test.go Migrate BaseAccount PubKey to use Any (#7268) 2020-09-25 08:41:16 +00:00