Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export PrivacyInfo.xcprivacy (#17054) #17282

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ load(":protobuf.bzl", "internal_objc_proto_library", "internal_php_proto_library

licenses(["notice"])

exports_files(["LICENSE"])
exports_files([
"LICENSE",
"PrivacyInfo.xcprivacy",
])

################################################################################
# Well Known Types Proto Library Rules
Expand Down
2 changes: 1 addition & 1 deletion upb/reflection/field_def.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ static void _upb_FieldDef_Create(upb_DefBuilder* ctx, const char* prefix,
f->full_name);
}

if (oneof_index >= upb_MessageDef_OneofCount(m)) {
if (oneof_index < 0 || oneof_index >= upb_MessageDef_OneofCount(m)) {
_upb_DefBuilder_Errf(ctx, "oneof_index out of range (%s)", f->full_name);
}

Expand Down
11 changes: 11 additions & 0 deletions upb/util/def_to_proto_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,15 @@ TEST(FuzzTest, RoundTripDescriptorRegressionOneofSameName) {
})pb"));
}

TEST(FuzzTest, NegativeOneofIndex) {
RoundTripDescriptor(ParseTextProtoOrDie(
R"pb(file {
message_type {
name: "A"
field { name: "A" number: 0 type_name: "" oneof_index: -1 }
}
}
)pb"));
}

} // namespace upb_test
Loading