From eebcd59a96a126307ddf6d16efe2977e64337ad7 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 19 May 2022 21:35:34 -0700 Subject: [PATCH] Fixed fuzz bug due to negative oneof index. PiperOrigin-RevId: 449900976 --- upb/def.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/upb/def.c b/upb/def.c index 1add146824..c745ff9f77 100644 --- a/upb/def.c +++ b/upb/def.c @@ -2339,8 +2339,7 @@ static void create_fielddef( } if (google_protobuf_FieldDescriptorProto_has_oneof_index(field_proto)) { - int oneof_index = - google_protobuf_FieldDescriptorProto_oneof_index(field_proto); + uint32_t oneof_index = google_protobuf_FieldDescriptorProto_oneof_index(field_proto); upb_OneofDef* oneof; upb_value v = upb_value_constptr(f);