Commit 6b0d8bd4 authored by Mark Brand's avatar Mark Brand Committed by Commit Bot

MojoLPM: Remove NOTREACHED from union traits.

This NOTREACHED was a poor decision, as fuzzer can directly reach this
code, so it will produce spurious check failures during fuzzing. Return
a 0 tag in this case instead - this will lead to the fuzzer trying to
deserialize a type which is not stored in the proto, which will fail
quietly instead.

Bug: 1076336
Change-Id: Ie6eb826c026f0e157fe71a030a4cd612dfa794e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302630
Commit-Queue: Mark Brand <markbrand@google.com>
Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794945}
parent b1b1ec14
......@@ -58,7 +58,6 @@ struct UnionTraits<{{dataview_type}}, {{union_type}}> {
return {{dataview_type}}::Tag::{{name|upper}};
{%- endfor %}
default:
NOTREACHED();
return static_cast<{{dataview_type}}::Tag>(0);
}
}{{"\n"}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment