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
This commit is contained in:
Protobuf Team Bot 2026-07-06 12:48:28 -07:00 committed by Copybara-Service
parent a8d0be3d42
commit f25fb36bfe

View file

@ -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;