From f25fb36bfe474362ee806dbc6b848c1d5bbe5a2d Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Mon, 6 Jul 2026 12:48:28 -0700 Subject: [PATCH] Correct add_descriptor_set size from an int to a size_t Closes potential bug as reported externally by mhmadqw909-cloud if an encoded descriptor >2GB was reached. PiperOrigin-RevId: 943444689 --- php/ext/google/protobuf/def.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/ext/google/protobuf/def.c b/php/ext/google/protobuf/def.c index 38f62dc724..0d8ad8216a 100644 --- a/php/ext/google/protobuf/def.c +++ b/php/ext/google/protobuf/def.c @@ -971,7 +971,7 @@ static void add_descriptor(upb_DefPool* symtab, * Adds the given descriptor data to this DescriptorPool. */ static void add_descriptor_set(upb_DefPool* symtab, const char* data, - int data_len, upb_Arena* arena) { + size_t data_len, upb_Arena* arena) { size_t i, n; google_protobuf_FileDescriptorSet* set; const google_protobuf_FileDescriptorProto* const* files;