mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-17 01:12:51 +00:00
internal/impl: init map value MessageInfos in validator
I'm not sure how to write a good test for this one, since it's so specific to both the code and the ordering of initialization. Just sticking the fuzzer-provided case into our standard test message set doesn't do it, because something else has initialized the MessageInfo by the time the test gets there. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20543 Change-Id: I508222b43e52287f73e2ed32ce9b954a5f81717b Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/218257 Reviewed-by: Joe Tsai <joetsai@google.com>
This commit is contained in:
parent
2eb18f0e62
commit
4eefd77886
@ -434,6 +434,9 @@ State:
|
||||
vi.mi.init()
|
||||
fallthrough
|
||||
case validationTypeMap:
|
||||
if vi.mi != nil {
|
||||
vi.mi.init()
|
||||
}
|
||||
states = append(states, validationState{
|
||||
typ: vi.typ,
|
||||
keyType: vi.keyType,
|
||||
|
Loading…
Reference in New Issue
Block a user