diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c29f7a..7a49866 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ format changes. ## [Unreleased] +### Fixed + +- **`check_decode`'s `Tree` has `branches` and `tags`** (protowire#449). + Without them the PB leg skipped both fields as unknown, so the corpus's + map-depth rows could not reach the decoder's map path. The decoders + needed no change: they already count a map's `{` and every PB map entry + toward `MaxNestingDepth`. + ### Changed - **The vendored shared schemas are re-synced with [trendvidia/protos](https://github.com/trendvidia/protos) v0.1.2** ([trendvidia/protowire#447](https://github.com/trendvidia/protowire/issues/447)). They gain protos' file options, and `envelope.proto`'s `go_package` now names a published package. Declarations and field numbers are unchanged, and so is this port's public API. diff --git a/cmd/check_decode/main.cc b/cmd/check_decode/main.cc index b5a175b..7f65293 100644 --- a/cmd/check_decode/main.cc +++ b/cmd/check_decode/main.cc @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -111,10 +112,16 @@ struct Tree { std::unique_ptr child; std::string label; std::vector children; + // Held by pointer so the map's value type is complete here, where the + // standard requires it; the wire form is the same as map. + std::map> branches; + std::map tags; PROTOWIRE_FIELDS(Tree, PROTOWIRE_FIELD(1, child), PROTOWIRE_FIELD(2, label), - PROTOWIRE_FIELD(3, children)) + PROTOWIRE_FIELD(3, children), + PROTOWIRE_FIELD(4, branches), + PROTOWIRE_FIELD(5, tags)) }; struct StringHolder {