|
|
|
@ -1684,7 +1684,7 @@ PROTOBUF_ALWAYS_INLINE const char* TcParser::RepeatedString( |
|
|
|
|
field.PrepareForParse())) { |
|
|
|
|
do { |
|
|
|
|
ptr += sizeof(TagType); |
|
|
|
|
ptr = ParseRepeatedStringOnce(ptr, arena, serial_arena, ctx, field); |
|
|
|
|
ptr = ParseRepeatedStringOnce(ptr, serial_arena, ctx, field); |
|
|
|
|
|
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(ptr == nullptr || !validate_last_string())) { |
|
|
|
|
PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS); |
|
|
|
@ -2273,11 +2273,11 @@ PROTOBUF_NOINLINE const char* TcParser::MpString(PROTOBUF_TC_PARAM_DECL) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
PROTOBUF_ALWAYS_INLINE const char* TcParser::ParseRepeatedStringOnce( |
|
|
|
|
const char* ptr, Arena* arena, SerialArena* serial_arena, ParseContext* ctx, |
|
|
|
|
const char* ptr, SerialArena* serial_arena, ParseContext* ctx, |
|
|
|
|
RepeatedPtrField<std::string>& field) { |
|
|
|
|
int size = ReadSize(&ptr); |
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(!ptr)) return {}; |
|
|
|
|
auto* str = Arena::Create<std::string>(arena); |
|
|
|
|
auto* str = new (serial_arena->AllocateFromStringBlock()) std::string(); |
|
|
|
|
field.AddAllocatedForParse(str); |
|
|
|
|
ptr = ctx->ReadString(ptr, size, str); |
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(!ptr)) return {}; |
|
|
|
@ -2312,7 +2312,7 @@ PROTOBUF_NOINLINE const char* TcParser::MpRepeatedString( |
|
|
|
|
field.PrepareForParse())) { |
|
|
|
|
do { |
|
|
|
|
ptr = ptr2; |
|
|
|
|
ptr = ParseRepeatedStringOnce(ptr, arena, serial_arena, ctx, field); |
|
|
|
|
ptr = ParseRepeatedStringOnce(ptr, serial_arena, ctx, field); |
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(ptr == nullptr || |
|
|
|
|
!MpVerifyUtf8(field[field.size() - 1], |
|
|
|
|
table, entry, xform_val))) { |
|
|
|
|