|
|
|
@ -8186,6 +8186,15 @@ static void _upb_Decoder_CheckUnlinked(upb_Decoder* d, const upb_MiniTable* mt, |
|
|
|
|
*op = kUpb_DecodeOp_UnknownField; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UPB_FORCEINLINE |
|
|
|
|
static void _upb_Decoder_MaybeVerifyUtf8(upb_Decoder* d, |
|
|
|
|
const upb_MiniTableField* field, |
|
|
|
|
int* op) { |
|
|
|
|
if ((field->UPB_ONLYBITS(mode) & kUpb_LabelFlags_IsAlternate) && |
|
|
|
|
UPB_UNLIKELY(d->options & kUpb_DecodeOption_AlwaysValidateUtf8)) |
|
|
|
|
*op = kUpb_DecodeOp_String; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int _upb_Decoder_GetDelimitedOp(upb_Decoder* d, const upb_MiniTable* mt, |
|
|
|
|
const upb_MiniTableField* field) { |
|
|
|
|
enum { kRepeatedBase = 19 }; |
|
|
|
@ -8242,6 +8251,8 @@ static int _upb_Decoder_GetDelimitedOp(upb_Decoder* d, const upb_MiniTable* mt, |
|
|
|
|
|
|
|
|
|
if (op == kUpb_DecodeOp_SubMessage) { |
|
|
|
|
_upb_Decoder_CheckUnlinked(d, mt, field, &op); |
|
|
|
|
} else if (op == kUpb_DecodeOp_Bytes) { |
|
|
|
|
_upb_Decoder_MaybeVerifyUtf8(d, field, &op); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return op; |
|
|
|
|