Skip to content

Commit c71fb2d

Browse files
committed
protobuf: Fix unexpected END_GROUP
Signed-off-by: Johannes Zottele <[email protected]>
1 parent 491e79e commit c71fb2d

File tree

14 files changed

+326
-0
lines changed

14 files changed

+326
-0
lines changed

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Any.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ public fun com.google.protobuf.kotlin.AnyInternal.Companion.decodeWith(
8989
}
9090

9191
else -> {
92+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
93+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
94+
}
95+
9296
// we are currently just skipping unknown fields (KRPC-191)
9397
decoder.skipValue(tag)
9498
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Api.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ public fun com.google.protobuf.kotlin.ApiInternal.Companion.decodeWith(
262262
}
263263

264264
else -> {
265+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
266+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
267+
}
268+
265269
// we are currently just skipping unknown fields (KRPC-191)
266270
decoder.skipValue(tag)
267271
}
@@ -421,6 +425,10 @@ public fun com.google.protobuf.kotlin.MethodInternal.Companion.decodeWith(
421425
}
422426

423427
else -> {
428+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
429+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
430+
}
431+
424432
// we are currently just skipping unknown fields (KRPC-191)
425433
decoder.skipValue(tag)
426434
}
@@ -529,6 +537,10 @@ public fun com.google.protobuf.kotlin.MixinInternal.Companion.decodeWith(
529537
}
530538

531539
else -> {
540+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
541+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
542+
}
543+
532544
// we are currently just skipping unknown fields (KRPC-191)
533545
decoder.skipValue(tag)
534546
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Duration.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ public fun com.google.protobuf.kotlin.DurationInternal.Companion.decodeWith(
8888
}
8989

9090
else -> {
91+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
92+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
93+
}
94+
9195
// we are currently just skipping unknown fields (KRPC-191)
9296
decoder.skipValue(tag)
9397
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Empty.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ public fun com.google.protobuf.kotlin.EmptyInternal.Companion.decodeWith(
6767
val tag = decoder.readTag() ?: break // EOF, we read the whole message
6868
when {
6969
else -> {
70+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
71+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
72+
}
73+
7074
// we are currently just skipping unknown fields (KRPC-191)
7175
decoder.skipValue(tag)
7276
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/FieldMask.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public fun com.google.protobuf.kotlin.FieldMaskInternal.Companion.decodeWith(
8181
}
8282

8383
else -> {
84+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
85+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
86+
}
87+
8488
// we are currently just skipping unknown fields (KRPC-191)
8589
decoder.skipValue(tag)
8690
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/SourceContext.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ public fun com.google.protobuf.kotlin.SourceContextInternal.Companion.decodeWith
7979
}
8080

8181
else -> {
82+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
83+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
84+
}
85+
8286
// we are currently just skipping unknown fields (KRPC-191)
8387
decoder.skipValue(tag)
8488
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Struct.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ public fun com.google.protobuf.kotlin.StructInternal.Companion.decodeWith(
196196
}
197197

198198
else -> {
199+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
200+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
201+
}
202+
199203
// we are currently just skipping unknown fields (KRPC-191)
200204
decoder.skipValue(tag)
201205
}
@@ -318,6 +322,10 @@ public fun com.google.protobuf.kotlin.ValueInternal.Companion.decodeWith(
318322
}
319323

320324
else -> {
325+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
326+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
327+
}
328+
321329
// we are currently just skipping unknown fields (KRPC-191)
322330
decoder.skipValue(tag)
323331
}
@@ -420,6 +428,10 @@ public fun com.google.protobuf.kotlin.ListValueInternal.Companion.decodeWith(
420428
}
421429

422430
else -> {
431+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
432+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
433+
}
434+
423435
// we are currently just skipping unknown fields (KRPC-191)
424436
decoder.skipValue(tag)
425437
}
@@ -487,6 +499,10 @@ public fun com.google.protobuf.kotlin.StructInternal.FieldsEntryInternal.Compani
487499
}
488500

489501
else -> {
502+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
503+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
504+
}
505+
490506
// we are currently just skipping unknown fields (KRPC-191)
491507
decoder.skipValue(tag)
492508
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Timestamp.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ public fun com.google.protobuf.kotlin.TimestampInternal.Companion.decodeWith(
8888
}
8989

9090
else -> {
91+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
92+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
93+
}
94+
9195
// we are currently just skipping unknown fields (KRPC-191)
9296
decoder.skipValue(tag)
9397
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Type.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ public fun com.google.protobuf.kotlin.TypeInternal.Companion.decodeWith(
357357
}
358358

359359
else -> {
360+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
361+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
362+
}
363+
360364
// we are currently just skipping unknown fields (KRPC-191)
361365
decoder.skipValue(tag)
362366
}
@@ -540,6 +544,10 @@ public fun com.google.protobuf.kotlin.FieldInternal.Companion.decodeWith(
540544
}
541545

542546
else -> {
547+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
548+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
549+
}
550+
543551
// we are currently just skipping unknown fields (KRPC-191)
544552
decoder.skipValue(tag)
545553
}
@@ -729,6 +737,10 @@ public fun com.google.protobuf.kotlin.EnumInternal.Companion.decodeWith(
729737
}
730738

731739
else -> {
740+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
741+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
742+
}
743+
732744
// we are currently just skipping unknown fields (KRPC-191)
733745
decoder.skipValue(tag)
734746
}
@@ -847,6 +859,10 @@ public fun com.google.protobuf.kotlin.EnumValueInternal.Companion.decodeWith(
847859
}
848860

849861
else -> {
862+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
863+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
864+
}
865+
850866
// we are currently just skipping unknown fields (KRPC-191)
851867
decoder.skipValue(tag)
852868
}
@@ -930,6 +946,10 @@ public fun com.google.protobuf.kotlin.OptionInternal.Companion.decodeWith(
930946
}
931947

932948
else -> {
949+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
950+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
951+
}
952+
933953
// we are currently just skipping unknown fields (KRPC-191)
934954
decoder.skipValue(tag)
935955
}

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Wrappers.kt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ public fun com.google.protobuf.kotlin.DoubleValueInternal.Companion.decodeWith(
414414
}
415415

416416
else -> {
417+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
418+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
419+
}
420+
417421
// we are currently just skipping unknown fields (KRPC-191)
418422
decoder.skipValue(tag)
419423
}
@@ -464,6 +468,10 @@ public fun com.google.protobuf.kotlin.FloatValueInternal.Companion.decodeWith(
464468
}
465469

466470
else -> {
471+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
472+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
473+
}
474+
467475
// we are currently just skipping unknown fields (KRPC-191)
468476
decoder.skipValue(tag)
469477
}
@@ -514,6 +522,10 @@ public fun com.google.protobuf.kotlin.Int64ValueInternal.Companion.decodeWith(
514522
}
515523

516524
else -> {
525+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
526+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
527+
}
528+
517529
// we are currently just skipping unknown fields (KRPC-191)
518530
decoder.skipValue(tag)
519531
}
@@ -564,6 +576,10 @@ public fun com.google.protobuf.kotlin.UInt64ValueInternal.Companion.decodeWith(
564576
}
565577

566578
else -> {
579+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
580+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
581+
}
582+
567583
// we are currently just skipping unknown fields (KRPC-191)
568584
decoder.skipValue(tag)
569585
}
@@ -614,6 +630,10 @@ public fun com.google.protobuf.kotlin.Int32ValueInternal.Companion.decodeWith(
614630
}
615631

616632
else -> {
633+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
634+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
635+
}
636+
617637
// we are currently just skipping unknown fields (KRPC-191)
618638
decoder.skipValue(tag)
619639
}
@@ -664,6 +684,10 @@ public fun com.google.protobuf.kotlin.UInt32ValueInternal.Companion.decodeWith(
664684
}
665685

666686
else -> {
687+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
688+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
689+
}
690+
667691
// we are currently just skipping unknown fields (KRPC-191)
668692
decoder.skipValue(tag)
669693
}
@@ -714,6 +738,10 @@ public fun com.google.protobuf.kotlin.BoolValueInternal.Companion.decodeWith(
714738
}
715739

716740
else -> {
741+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
742+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
743+
}
744+
717745
// we are currently just skipping unknown fields (KRPC-191)
718746
decoder.skipValue(tag)
719747
}
@@ -764,6 +792,10 @@ public fun com.google.protobuf.kotlin.StringValueInternal.Companion.decodeWith(
764792
}
765793

766794
else -> {
795+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
796+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
797+
}
798+
767799
// we are currently just skipping unknown fields (KRPC-191)
768800
decoder.skipValue(tag)
769801
}
@@ -816,6 +848,10 @@ public fun com.google.protobuf.kotlin.BytesValueInternal.Companion.decodeWith(
816848
}
817849

818850
else -> {
851+
if (tag.wireType == kotlinx.rpc.protobuf.internal.WireType.END_GROUP) {
852+
throw kotlinx.rpc.protobuf.internal.ProtobufDecodingException("Unexpected END_GROUP tag.")
853+
}
854+
819855
// we are currently just skipping unknown fields (KRPC-191)
820856
decoder.skipValue(tag)
821857
}

0 commit comments

Comments
 (0)