Fixed fuzz bug due to negative oneof index.

PiperOrigin-RevId: 449900976
pull/13171/head
Joshua Haberman 3 years ago committed by Copybara-Service
parent 285474d8e1
commit eebcd59a96
  1. 3
      upb/def.c

@ -2339,8 +2339,7 @@ static void create_fielddef(
} }
if (google_protobuf_FieldDescriptorProto_has_oneof_index(field_proto)) { if (google_protobuf_FieldDescriptorProto_has_oneof_index(field_proto)) {
int oneof_index = uint32_t oneof_index = google_protobuf_FieldDescriptorProto_oneof_index(field_proto);
google_protobuf_FieldDescriptorProto_oneof_index(field_proto);
upb_OneofDef* oneof; upb_OneofDef* oneof;
upb_value v = upb_value_constptr(f); upb_value v = upb_value_constptr(f);

Loading…
Cancel
Save