cosmos-sdk/codec/unknownproto
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
..
benchmarks_test.go Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
doc.go Reject unknown fields in TxDecoder and sign mode handlers (#6883) 2020-08-03 19:47:25 +00:00
regression_test.go unknownproto: check result from protowire.ConsumeFieldValue and return an error (#7770) 2020-11-09 17:58:13 +00:00
unit_helpers_test.go codec: implement protobuf unknown fields checker (#6557) 2020-07-29 11:31:23 -04:00
unknown_fields.go unknownproto: check result from protowire.ConsumeFieldValue and return an error (#7770) 2020-11-09 17:58:13 +00:00
unknown_fields_test.go Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00