diff --git a/plugin/unmarshal/unmarshal.go b/plugin/unmarshal/unmarshal.go index 9a2374b563..fae67de4fd 100644 --- a/plugin/unmarshal/unmarshal.go +++ b/plugin/unmarshal/unmarshal.go @@ -844,7 +844,7 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip p.P(`return err`) p.Out() p.P(`}`) - p.P(`if skippy < 0 {`) + p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`) p.In() p.P(`return ErrInvalidLength`, p.localName) p.Out() @@ -1484,12 +1484,7 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) { p.P(`return err`) p.Out() p.P(`}`) - p.P(`if skippy < 0 {`) - p.In() - p.P(`return ErrInvalidLength`, p.localName) - p.Out() - p.P(`}`) - p.P(`if (iNdEx + skippy) < 0 {`) + p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`) p.In() p.P(`return ErrInvalidLength`, p.localName) p.Out() @@ -1512,12 +1507,7 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) { p.P(`return err`) p.Out() p.P(`}`) - p.P(`if skippy < 0 {`) - p.In() - p.P(`return ErrInvalidLength`, p.localName) - p.Out() - p.P(`}`) - p.P(`if (iNdEx + skippy) < 0 {`) + p.P(`if (skippy < 0) || (iNdEx + skippy) < 0 {`) p.In() p.P(`return ErrInvalidLength`, p.localName) p.Out() diff --git a/test/asymetric-issue125/asym.pb.go b/test/asymetric-issue125/asym.pb.go index a960a97c39..4a5bd85d86 100644 --- a/test/asymetric-issue125/asym.pb.go +++ b/test/asymetric-issue125/asym.pb.go @@ -473,10 +473,7 @@ func (m *M) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAsym - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAsym } if (iNdEx + skippy) > l { @@ -527,10 +524,7 @@ func (m *MyType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAsym - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAsym } if (iNdEx + skippy) > l { diff --git a/test/casttype/combos/both/casttype.pb.go b/test/casttype/combos/both/casttype.pb.go index 0191067fce..9436098a32 100644 --- a/test/casttype/combos/both/casttype.pb.go +++ b/test/casttype/combos/both/casttype.pb.go @@ -2064,7 +2064,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -2177,7 +2177,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -2292,7 +2292,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -2407,7 +2407,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -2457,10 +2457,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > l { @@ -2531,10 +2528,7 @@ func (m *Wilson) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > l { diff --git a/test/casttype/combos/unmarshaler/casttype.pb.go b/test/casttype/combos/unmarshaler/casttype.pb.go index 4f61c03599..442e05fb64 100644 --- a/test/casttype/combos/unmarshaler/casttype.pb.go +++ b/test/casttype/combos/unmarshaler/casttype.pb.go @@ -1830,7 +1830,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -1943,7 +1943,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -2058,7 +2058,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -2173,7 +2173,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > postIndex { @@ -2223,10 +2223,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > l { @@ -2297,10 +2294,7 @@ func (m *Wilson) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCasttype } if (iNdEx + skippy) > l { diff --git a/test/castvalue/combos/both/castvalue.pb.go b/test/castvalue/combos/both/castvalue.pb.go index aa00bc6598..60c14ca64c 100644 --- a/test/castvalue/combos/both/castvalue.pb.go +++ b/test/castvalue/combos/both/castvalue.pb.go @@ -1168,7 +1168,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > postIndex { @@ -1283,7 +1283,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > postIndex { @@ -1300,10 +1300,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > l { @@ -1374,10 +1371,7 @@ func (m *Wilson) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > l { diff --git a/test/castvalue/combos/unmarshaler/castvalue.pb.go b/test/castvalue/combos/unmarshaler/castvalue.pb.go index 462bd6bfe0..5139c8790d 100644 --- a/test/castvalue/combos/unmarshaler/castvalue.pb.go +++ b/test/castvalue/combos/unmarshaler/castvalue.pb.go @@ -1036,7 +1036,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > postIndex { @@ -1151,7 +1151,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > postIndex { @@ -1168,10 +1168,7 @@ func (m *Castaway) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > l { @@ -1242,10 +1239,7 @@ func (m *Wilson) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthCastvalue } if (iNdEx + skippy) > l { diff --git a/test/combos/both/thetest.pb.go b/test/combos/both/thetest.pb.go index b1f0e7e1da..d6b45ccb1e 100644 --- a/test/combos/both/thetest.pb.go +++ b/test/combos/both/thetest.pb.go @@ -32576,10 +32576,7 @@ func (m *NidOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -32909,10 +32906,7 @@ func (m *NinOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33873,10 +33867,7 @@ func (m *NidRepNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -34837,10 +34828,7 @@ func (m *NinRepNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35737,10 +35725,7 @@ func (m *NidRepPackedNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36637,10 +36622,7 @@ func (m *NinRepPackedNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36938,10 +36920,7 @@ func (m *NidOptStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37253,10 +37232,7 @@ func (m *NinOptStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37805,10 +37781,7 @@ func (m *NidRepStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38357,10 +38330,7 @@ func (m *NinRepStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38500,10 +38470,7 @@ func (m *NidEmbeddedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38647,10 +38614,7 @@ func (m *NinEmbeddedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38768,10 +38732,7 @@ func (m *NidNestedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38892,10 +38853,7 @@ func (m *NinNestedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39012,10 +38970,7 @@ func (m *NidOptCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39101,10 +39056,7 @@ func (m *CustomDash) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39225,10 +39177,7 @@ func (m *NinOptCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39349,10 +39298,7 @@ func (m *NidRepCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39473,10 +39419,7 @@ func (m *NinRepCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39719,10 +39662,7 @@ func (m *NinOptNativeUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39998,10 +39938,7 @@ func (m *NinOptStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40145,10 +40082,7 @@ func (m *NinEmbeddedStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40307,10 +40241,7 @@ func (m *NinNestedStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40469,10 +40400,7 @@ func (m *Tree) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40589,10 +40517,7 @@ func (m *OrBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40709,10 +40634,7 @@ func (m *AndBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40814,10 +40736,7 @@ func (m *Leaf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40976,10 +40895,7 @@ func (m *DeepTree) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41063,10 +40979,7 @@ func (m *ADeepBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41183,10 +41096,7 @@ func (m *AndDeepBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41270,10 +41180,7 @@ func (m *DeepLeaf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41324,10 +41231,7 @@ func (m *Nil) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41397,10 +41301,7 @@ func (m *NidOptEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41511,10 +41412,7 @@ func (m *NinOptEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41772,10 +41670,7 @@ func (m *NidRepEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42033,10 +41928,7 @@ func (m *NinRepEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42147,10 +42039,7 @@ func (m *NinOptEnumDefault) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42261,10 +42150,7 @@ func (m *AnotherNinOptEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42375,10 +42261,7 @@ func (m *AnotherNinOptEnumDefault) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42483,10 +42366,7 @@ func (m *Timer) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42566,10 +42446,7 @@ func (m *MyExtendable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42583,10 +42460,7 @@ func (m *MyExtendable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42723,10 +42597,7 @@ func (m *OtherExtenable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42740,10 +42611,7 @@ func (m *OtherExtenable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42907,10 +42775,7 @@ func (m *NestedDefinition) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -43008,10 +42873,7 @@ func (m *NestedDefinition_NestedMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -43095,10 +42957,7 @@ func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(dAtA []byte) if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -43241,10 +43100,7 @@ func (m *NestedScope) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -43574,10 +43430,7 @@ func (m *NinOptNativeDefault) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -43661,10 +43514,7 @@ func (m *CustomContainer) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -43981,10 +43831,7 @@ func (m *CustomNameNidOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -44314,10 +44161,7 @@ func (m *CustomNameNinOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -45278,10 +45122,7 @@ func (m *CustomNameNinRepNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -45591,10 +45432,7 @@ func (m *CustomNameNinStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -45785,10 +45623,7 @@ func (m *CustomNameCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -45932,10 +45767,7 @@ func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46075,10 +45907,7 @@ func (m *CustomNameEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46158,10 +45987,7 @@ func (m *NoExtensionsMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46175,10 +46001,7 @@ func (m *NoExtensionsMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46263,10 +46086,7 @@ func (m *Unrecognized) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46383,10 +46203,7 @@ func (m *UnrecognizedWithInner) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46457,10 +46274,7 @@ func (m *UnrecognizedWithInner_Inner) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46576,10 +46390,7 @@ func (m *UnrecognizedWithEmbed) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46650,10 +46461,7 @@ func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46770,10 +46578,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46860,10 +46665,7 @@ func (m *NonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -46947,10 +46749,7 @@ func (m *NidOptNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -47037,10 +46836,7 @@ func (m *NinOptNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -47125,10 +46921,7 @@ func (m *NidRepNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -47213,10 +47006,7 @@ func (m *NinRepNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -47300,10 +47090,7 @@ func (m *ProtoType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { diff --git a/test/combos/unmarshaler/thetest.pb.go b/test/combos/unmarshaler/thetest.pb.go index 22b1625a98..5e542ddb34 100644 --- a/test/combos/unmarshaler/thetest.pb.go +++ b/test/combos/unmarshaler/thetest.pb.go @@ -27456,10 +27456,7 @@ func (m *NidOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -27789,10 +27786,7 @@ func (m *NinOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -28753,10 +28747,7 @@ func (m *NidRepNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -29717,10 +29708,7 @@ func (m *NinRepNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -30617,10 +30605,7 @@ func (m *NidRepPackedNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -31517,10 +31502,7 @@ func (m *NinRepPackedNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -31818,10 +31800,7 @@ func (m *NidOptStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -32133,10 +32112,7 @@ func (m *NinOptStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -32685,10 +32661,7 @@ func (m *NidRepStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33237,10 +33210,7 @@ func (m *NinRepStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33380,10 +33350,7 @@ func (m *NidEmbeddedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33527,10 +33494,7 @@ func (m *NinEmbeddedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33648,10 +33612,7 @@ func (m *NidNestedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33772,10 +33733,7 @@ func (m *NinNestedStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33892,10 +33850,7 @@ func (m *NidOptCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -33981,10 +33936,7 @@ func (m *CustomDash) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -34105,10 +34057,7 @@ func (m *NinOptCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -34229,10 +34178,7 @@ func (m *NidRepCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -34353,10 +34299,7 @@ func (m *NinRepCustom) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -34599,10 +34542,7 @@ func (m *NinOptNativeUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -34878,10 +34818,7 @@ func (m *NinOptStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35025,10 +34962,7 @@ func (m *NinEmbeddedStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35187,10 +35121,7 @@ func (m *NinNestedStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35349,10 +35280,7 @@ func (m *Tree) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35469,10 +35397,7 @@ func (m *OrBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35589,10 +35514,7 @@ func (m *AndBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35694,10 +35616,7 @@ func (m *Leaf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35856,10 +35775,7 @@ func (m *DeepTree) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -35943,10 +35859,7 @@ func (m *ADeepBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36063,10 +35976,7 @@ func (m *AndDeepBranch) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36150,10 +36060,7 @@ func (m *DeepLeaf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36204,10 +36111,7 @@ func (m *Nil) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36277,10 +36181,7 @@ func (m *NidOptEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36391,10 +36292,7 @@ func (m *NinOptEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36652,10 +36550,7 @@ func (m *NidRepEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -36913,10 +36808,7 @@ func (m *NinRepEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37027,10 +36919,7 @@ func (m *NinOptEnumDefault) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37141,10 +37030,7 @@ func (m *AnotherNinOptEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37255,10 +37141,7 @@ func (m *AnotherNinOptEnumDefault) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37363,10 +37246,7 @@ func (m *Timer) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37446,10 +37326,7 @@ func (m *MyExtendable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37463,10 +37340,7 @@ func (m *MyExtendable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37603,10 +37477,7 @@ func (m *OtherExtenable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37620,10 +37491,7 @@ func (m *OtherExtenable) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37787,10 +37655,7 @@ func (m *NestedDefinition) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37888,10 +37753,7 @@ func (m *NestedDefinition_NestedMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -37975,10 +37837,7 @@ func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Unmarshal(dAtA []byte) if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38121,10 +37980,7 @@ func (m *NestedScope) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38454,10 +38310,7 @@ func (m *NinOptNativeDefault) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38541,10 +38394,7 @@ func (m *CustomContainer) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -38861,10 +38711,7 @@ func (m *CustomNameNidOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -39194,10 +39041,7 @@ func (m *CustomNameNinOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40158,10 +40002,7 @@ func (m *CustomNameNinRepNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40471,10 +40312,7 @@ func (m *CustomNameNinStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40665,10 +40503,7 @@ func (m *CustomNameCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40812,10 +40647,7 @@ func (m *CustomNameNinEmbeddedStructUnion) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -40955,10 +40787,7 @@ func (m *CustomNameEnum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41038,10 +40867,7 @@ func (m *NoExtensionsMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41055,10 +40881,7 @@ func (m *NoExtensionsMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41143,10 +40966,7 @@ func (m *Unrecognized) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41263,10 +41083,7 @@ func (m *UnrecognizedWithInner) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41337,10 +41154,7 @@ func (m *UnrecognizedWithInner_Inner) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41456,10 +41270,7 @@ func (m *UnrecognizedWithEmbed) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41530,10 +41341,7 @@ func (m *UnrecognizedWithEmbed_Embedded) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41650,10 +41458,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41740,10 +41545,7 @@ func (m *NonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41827,10 +41629,7 @@ func (m *NidOptNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -41917,10 +41716,7 @@ func (m *NinOptNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42005,10 +41801,7 @@ func (m *NidRepNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42093,10 +41886,7 @@ func (m *NinRepNonByteCustomType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { @@ -42180,10 +41970,7 @@ func (m *ProtoType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthThetest - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthThetest } if (iNdEx + skippy) > l { diff --git a/test/custombytesnonstruct/proto.pb.go b/test/custombytesnonstruct/proto.pb.go index 1986833b6c..b518785c70 100644 --- a/test/custombytesnonstruct/proto.pb.go +++ b/test/custombytesnonstruct/proto.pb.go @@ -179,10 +179,7 @@ func (m *Object) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProto } if (iNdEx + skippy) > l { diff --git a/test/data/data.pb.go b/test/data/data.pb.go index ccc7cd05b3..01612ec602 100644 --- a/test/data/data.pb.go +++ b/test/data/data.pb.go @@ -391,10 +391,7 @@ func (m *MyMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthData - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthData } if (iNdEx + skippy) > l { diff --git a/test/empty-issue70/empty.pb.go b/test/empty-issue70/empty.pb.go index 9e97bf209e..e67f8383ec 100644 --- a/test/empty-issue70/empty.pb.go +++ b/test/empty-issue70/empty.pb.go @@ -103,10 +103,7 @@ func (m *TestRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEmpty - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEmpty } if (iNdEx + skippy) > l { diff --git a/test/enumdecl/enumdecl.pb.go b/test/enumdecl/enumdecl.pb.go index cbc4897292..e6e0671031 100644 --- a/test/enumdecl/enumdecl.pb.go +++ b/test/enumdecl/enumdecl.pb.go @@ -372,10 +372,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEnumdecl - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEnumdecl } if (iNdEx + skippy) > l { diff --git a/test/enumdecl_all/enumdeclall.pb.go b/test/enumdecl_all/enumdeclall.pb.go index 7c7deae763..48dd7bb744 100644 --- a/test/enumdecl_all/enumdeclall.pb.go +++ b/test/enumdecl_all/enumdeclall.pb.go @@ -444,10 +444,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEnumdeclall - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEnumdeclall } if (iNdEx + skippy) > l { diff --git a/test/example/example.pb.go b/test/example/example.pb.go index 7fffdfa82e..a340b9667a 100644 --- a/test/example/example.pb.go +++ b/test/example/example.pb.go @@ -2118,10 +2118,7 @@ func (m *A) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { @@ -2240,10 +2237,7 @@ func (m *B) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { @@ -2314,10 +2308,7 @@ func (m *C) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { @@ -2440,10 +2431,7 @@ func (m *U) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { @@ -2503,10 +2491,7 @@ func (m *E) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { @@ -2520,10 +2505,7 @@ func (m *E) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { @@ -2595,10 +2577,7 @@ func (m *R) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { @@ -2668,10 +2647,7 @@ func (m *CastType) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthExample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthExample } if (iNdEx + skippy) > l { diff --git a/test/fuzztests/fuzz.pb.go b/test/fuzztests/fuzz.pb.go index 57a3820107..03f57dda49 100644 --- a/test/fuzztests/fuzz.pb.go +++ b/test/fuzztests/fuzz.pb.go @@ -1403,10 +1403,7 @@ func (m *Nil) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFuzz } if (iNdEx + skippy) > l { @@ -2303,10 +2300,7 @@ func (m *NinRepPackedNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFuzz } if (iNdEx + skippy) > l { @@ -2636,10 +2630,7 @@ func (m *NinOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFuzz } if (iNdEx + skippy) > l { @@ -2951,10 +2942,7 @@ func (m *NinOptStruct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthFuzz - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFuzz } if (iNdEx + skippy) > l { diff --git a/test/importcustom-issue389/imported/a.pb.go b/test/importcustom-issue389/imported/a.pb.go index 4c56662b6f..54f5e15f22 100644 --- a/test/importcustom-issue389/imported/a.pb.go +++ b/test/importcustom-issue389/imported/a.pb.go @@ -331,10 +331,7 @@ func (m *A) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthA - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthA } if (iNdEx + skippy) > l { diff --git a/test/importcustom-issue389/importing/c.pb.go b/test/importcustom-issue389/importing/c.pb.go index 39eaec46c2..3b3006e304 100644 --- a/test/importcustom-issue389/importing/c.pb.go +++ b/test/importcustom-issue389/importing/c.pb.go @@ -345,10 +345,7 @@ func (m *C) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthC - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthC } if (iNdEx + skippy) > l { diff --git a/test/indeximport-issue72/index/index.pb.go b/test/indeximport-issue72/index/index.pb.go index 01035cd47e..b0f604d349 100644 --- a/test/indeximport-issue72/index/index.pb.go +++ b/test/indeximport-issue72/index/index.pb.go @@ -407,10 +407,7 @@ func (m *IndexQuery) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIndex - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndex } if (iNdEx + skippy) > l { diff --git a/test/indeximport-issue72/indeximport.pb.go b/test/indeximport-issue72/indeximport.pb.go index a945b5d752..ef6cca9e3d 100644 --- a/test/indeximport-issue72/indeximport.pb.go +++ b/test/indeximport-issue72/indeximport.pb.go @@ -357,10 +357,7 @@ func (m *IndexQueries) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIndeximport - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIndeximport } if (iNdEx + skippy) > l { diff --git a/test/int64support/object.pb.go b/test/int64support/object.pb.go index 44b50cbbde..e2d7fb7be6 100644 --- a/test/int64support/object.pb.go +++ b/test/int64support/object.pb.go @@ -394,10 +394,7 @@ func (m *Object) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthObject - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthObject } if (iNdEx + skippy) > l { diff --git a/test/issue260/issue260.pb.go b/test/issue260/issue260.pb.go index 64c0a318f4..6ea5954272 100644 --- a/test/issue260/issue260.pb.go +++ b/test/issue260/issue260.pb.go @@ -755,10 +755,7 @@ func (m *Dropped) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue260 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue260 } if (iNdEx + skippy) > l { @@ -879,10 +876,7 @@ func (m *DroppedWithoutGetters) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue260 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue260 } if (iNdEx + skippy) > l { @@ -983,10 +977,7 @@ func (m *Kept) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue260 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue260 } if (iNdEx + skippy) > l { diff --git a/test/issue261/issue261.pb.go b/test/issue261/issue261.pb.go index e2ba9bcf50..f6db9ab4c8 100644 --- a/test/issue261/issue261.pb.go +++ b/test/issue261/issue261.pb.go @@ -405,7 +405,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue261 } if (iNdEx + skippy) > postIndex { @@ -422,10 +422,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue261 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue261 } if (iNdEx + skippy) > l { diff --git a/test/issue262/timefail.pb.go b/test/issue262/timefail.pb.go index b7377ee8cb..f4ff326a8f 100644 --- a/test/issue262/timefail.pb.go +++ b/test/issue262/timefail.pb.go @@ -294,10 +294,7 @@ func (m *TimeFail) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTimefail - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTimefail } if (iNdEx + skippy) > l { diff --git a/test/issue322/issue322.pb.go b/test/issue322/issue322.pb.go index e124f2df5b..992afb2c1a 100644 --- a/test/issue322/issue322.pb.go +++ b/test/issue322/issue322.pb.go @@ -546,10 +546,7 @@ func (m *OneofTest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue322 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue322 } if (iNdEx + skippy) > l { diff --git a/test/issue330/issue330.pb.go b/test/issue330/issue330.pb.go index 94648e3bfc..88d6cf223d 100644 --- a/test/issue330/issue330.pb.go +++ b/test/issue330/issue330.pb.go @@ -317,10 +317,7 @@ func (m *Object) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue330 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue330 } if (iNdEx + skippy) > l { diff --git a/test/issue34/proto.pb.go b/test/issue34/proto.pb.go index 6eedb6e67e..e1ac088b9e 100644 --- a/test/issue34/proto.pb.go +++ b/test/issue34/proto.pb.go @@ -186,10 +186,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProto } if (iNdEx + skippy) > l { @@ -272,10 +269,7 @@ func (m *FooWithRepeated) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProto } if (iNdEx + skippy) > l { diff --git a/test/issue42order/issue42.pb.go b/test/issue42order/issue42.pb.go index 4d7eb42a7f..1217b19ce8 100644 --- a/test/issue42order/issue42.pb.go +++ b/test/issue42order/issue42.pb.go @@ -460,10 +460,7 @@ func (m *UnorderedFields) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue42 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue42 } if (iNdEx + skippy) > l { @@ -545,10 +542,7 @@ func (m *OrderedFields) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue42 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue42 } if (iNdEx + skippy) > l { diff --git a/test/issue449/issue449.pb.go b/test/issue449/issue449.pb.go index f0167d91ea..984aed9a1c 100644 --- a/test/issue449/issue449.pb.go +++ b/test/issue449/issue449.pb.go @@ -476,10 +476,7 @@ func (m *CodeGenMsg) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue449 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue449 } if (iNdEx + skippy) > l { diff --git a/test/issue498/issue498.pb.go b/test/issue498/issue498.pb.go index 6aefa13e08..f47e68bdab 100644 --- a/test/issue498/issue498.pb.go +++ b/test/issue498/issue498.pb.go @@ -482,10 +482,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue498 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue498 } if (iNdEx + skippy) > l { diff --git a/test/issue503/issue503.pb.go b/test/issue503/issue503.pb.go index e15b91ef99..d9bfb0cd32 100644 --- a/test/issue503/issue503.pb.go +++ b/test/issue503/issue503.pb.go @@ -733,10 +733,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue503 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue503 } if (iNdEx + skippy) > l { diff --git a/test/issue530/issue530.pb.go b/test/issue530/issue530.pb.go index 63508479e6..5edca49eea 100644 --- a/test/issue530/issue530.pb.go +++ b/test/issue530/issue530.pb.go @@ -2642,7 +2642,7 @@ func (m *Foo5) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > postIndex { @@ -2771,7 +2771,7 @@ func (m *Foo5) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > postIndex { @@ -2788,10 +2788,7 @@ func (m *Foo5) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -2873,10 +2870,7 @@ func (m *Bar1) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -2959,10 +2953,7 @@ func (m *Bar2) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -3080,10 +3071,7 @@ func (m *Bar3) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -3165,10 +3153,7 @@ func (m *Bar4) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -3286,10 +3271,7 @@ func (m *Bar5) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -3472,10 +3454,7 @@ func (m *Bar7) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -3559,10 +3538,7 @@ func (m *Bar8) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { @@ -3644,10 +3620,7 @@ func (m *Bar9) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue530 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue530 } if (iNdEx + skippy) > l { diff --git a/test/issue617/issue617.pb.go b/test/issue617/issue617.pb.go index 4763a89836..9aa743d5f2 100644 --- a/test/issue617/issue617.pb.go +++ b/test/issue617/issue617.pb.go @@ -368,10 +368,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue617 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue617 } if (iNdEx + skippy) > l { @@ -422,10 +419,7 @@ func (m *Foo_Bar) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthIssue617 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthIssue617 } if (iNdEx + skippy) > l { diff --git a/test/issue8/proto.pb.go b/test/issue8/proto.pb.go index 36472aa8e7..6da5317d3e 100644 --- a/test/issue8/proto.pb.go +++ b/test/issue8/proto.pb.go @@ -251,10 +251,7 @@ func (m *Foo) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProto } if (iNdEx + skippy) > l { diff --git a/test/mapdefaults/combos/both/map.pb.go b/test/mapdefaults/combos/both/map.pb.go index d09386413f..4b8cfee8c0 100644 --- a/test/mapdefaults/combos/both/map.pb.go +++ b/test/mapdefaults/combos/both/map.pb.go @@ -1267,7 +1267,7 @@ func (m *MapTest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > postIndex { @@ -1284,10 +1284,7 @@ func (m *MapTest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > l { @@ -1372,10 +1369,7 @@ func (m *FakeMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > l { @@ -1522,10 +1516,7 @@ func (m *FakeMapEntry) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > l { diff --git a/test/mapdefaults/combos/unmarshaler/map.pb.go b/test/mapdefaults/combos/unmarshaler/map.pb.go index fbbc32e8be..ae1092e06d 100644 --- a/test/mapdefaults/combos/unmarshaler/map.pb.go +++ b/test/mapdefaults/combos/unmarshaler/map.pb.go @@ -1094,7 +1094,7 @@ func (m *MapTest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > postIndex { @@ -1111,10 +1111,7 @@ func (m *MapTest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > l { @@ -1199,10 +1196,7 @@ func (m *FakeMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > l { @@ -1349,10 +1343,7 @@ func (m *FakeMapEntry) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMap } if (iNdEx + skippy) > l { diff --git a/test/mapsproto2/combos/both/mapsproto2.pb.go b/test/mapsproto2/combos/both/mapsproto2.pb.go index 0b7ae4a78c..4d64e36218 100644 --- a/test/mapsproto2/combos/both/mapsproto2.pb.go +++ b/test/mapsproto2/combos/both/mapsproto2.pb.go @@ -4719,10 +4719,7 @@ func (m *FloatingPoint) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { @@ -4886,7 +4883,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5016,7 +5013,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5146,7 +5143,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5276,7 +5273,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5293,10 +5290,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { @@ -5436,7 +5430,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5542,7 +5536,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5641,7 +5635,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5740,7 +5734,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5839,7 +5833,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5938,7 +5932,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6043,7 +6037,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6148,7 +6142,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6229,7 +6223,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6310,7 +6304,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6391,7 +6385,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6472,7 +6466,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6575,7 +6569,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6702,7 +6696,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6830,7 +6824,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6943,7 +6937,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7072,7 +7066,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7089,10 +7083,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { @@ -7232,7 +7223,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7338,7 +7329,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7437,7 +7428,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7536,7 +7527,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7635,7 +7626,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7734,7 +7725,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7839,7 +7830,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7944,7 +7935,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8025,7 +8016,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8106,7 +8097,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8187,7 +8178,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8268,7 +8259,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8371,7 +8362,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8498,7 +8489,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8626,7 +8617,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8739,7 +8730,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8868,7 +8859,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -8885,10 +8876,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { diff --git a/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go b/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go index b0cc8bb233..7ecb4c1f3e 100644 --- a/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go +++ b/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go @@ -3767,10 +3767,7 @@ func (m *FloatingPoint) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { @@ -3934,7 +3931,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4064,7 +4061,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4194,7 +4191,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4324,7 +4321,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4341,10 +4338,7 @@ func (m *CustomMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { @@ -4484,7 +4478,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4590,7 +4584,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4689,7 +4683,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4788,7 +4782,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4887,7 +4881,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -4986,7 +4980,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5091,7 +5085,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5196,7 +5190,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5277,7 +5271,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5358,7 +5352,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5439,7 +5433,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5520,7 +5514,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5623,7 +5617,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5750,7 +5744,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5878,7 +5872,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -5991,7 +5985,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6120,7 +6114,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6137,10 +6131,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { @@ -6280,7 +6271,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6386,7 +6377,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6485,7 +6476,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6584,7 +6575,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6683,7 +6674,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6782,7 +6773,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6887,7 +6878,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -6992,7 +6983,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7073,7 +7064,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7154,7 +7145,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7235,7 +7226,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7316,7 +7307,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7419,7 +7410,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7546,7 +7537,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7674,7 +7665,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7787,7 +7778,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7916,7 +7907,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > postIndex { @@ -7933,10 +7924,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthMapsproto2 } if (iNdEx + skippy) > l { diff --git a/test/nopackage/nopackage.pb.go b/test/nopackage/nopackage.pb.go index a7d1dc715d..f4b38dd7ac 100644 --- a/test/nopackage/nopackage.pb.go +++ b/test/nopackage/nopackage.pb.go @@ -296,7 +296,7 @@ func (m *M) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNopackage } if (iNdEx + skippy) > postIndex { @@ -313,10 +313,7 @@ func (m *M) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthNopackage - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthNopackage } if (iNdEx + skippy) > l { diff --git a/test/oneof/combos/both/one.pb.go b/test/oneof/combos/both/one.pb.go index faf9e2584e..905dd218d3 100644 --- a/test/oneof/combos/both/one.pb.go +++ b/test/oneof/combos/both/one.pb.go @@ -5730,10 +5730,7 @@ func (m *Subby) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -6093,10 +6090,7 @@ func (m *AllTypesOneOf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -6289,10 +6283,7 @@ func (m *TwoOneofs) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -6451,10 +6442,7 @@ func (m *CustomOneof) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { diff --git a/test/oneof/combos/unmarshaler/one.pb.go b/test/oneof/combos/unmarshaler/one.pb.go index e993379340..937ebe52d6 100644 --- a/test/oneof/combos/unmarshaler/one.pb.go +++ b/test/oneof/combos/unmarshaler/one.pb.go @@ -5148,10 +5148,7 @@ func (m *Subby) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -5511,10 +5508,7 @@ func (m *AllTypesOneOf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -5707,10 +5701,7 @@ func (m *TwoOneofs) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -5869,10 +5860,7 @@ func (m *CustomOneof) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { diff --git a/test/oneof3/combos/both/one.pb.go b/test/oneof3/combos/both/one.pb.go index c70658c57d..3b3825a856 100644 --- a/test/oneof3/combos/both/one.pb.go +++ b/test/oneof3/combos/both/one.pb.go @@ -3481,10 +3481,7 @@ func (m *Subby) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -3844,10 +3841,7 @@ func (m *SampleOneOf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { diff --git a/test/oneof3/combos/unmarshaler/one.pb.go b/test/oneof3/combos/unmarshaler/one.pb.go index 5a3cbc25ff..07c839b7a1 100644 --- a/test/oneof3/combos/unmarshaler/one.pb.go +++ b/test/oneof3/combos/unmarshaler/one.pb.go @@ -3161,10 +3161,7 @@ func (m *Subby) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { @@ -3524,10 +3521,7 @@ func (m *SampleOneOf) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthOne - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthOne } if (iNdEx + skippy) > l { diff --git a/test/packed/packed.pb.go b/test/packed/packed.pb.go index eb5400926e..d04c8ae912 100644 --- a/test/packed/packed.pb.go +++ b/test/packed/packed.pb.go @@ -2042,10 +2042,7 @@ func (m *NinRepNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPacked } if (iNdEx + skippy) > l { @@ -2942,10 +2939,7 @@ func (m *NinRepPackedNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPacked } if (iNdEx + skippy) > l { @@ -3842,10 +3836,7 @@ func (m *NinRepNativeUnsafe) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPacked } if (iNdEx + skippy) > l { @@ -4742,10 +4733,7 @@ func (m *NinRepPackedNativeUnsafe) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthPacked - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthPacked } if (iNdEx + skippy) > l { diff --git a/test/protosize/protosize.pb.go b/test/protosize/protosize.pb.go index b40179a85d..97d80d3484 100644 --- a/test/protosize/protosize.pb.go +++ b/test/protosize/protosize.pb.go @@ -504,10 +504,7 @@ func (m *SizeMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProtosize - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtosize } if (iNdEx + skippy) > l { diff --git a/test/required/requiredexample.pb.go b/test/required/requiredexample.pb.go index 444000a7a3..523e8657e4 100644 --- a/test/required/requiredexample.pb.go +++ b/test/required/requiredexample.pb.go @@ -1335,10 +1335,7 @@ func (m *RequiredExample) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRequiredexample } if (iNdEx + skippy) > l { @@ -1674,10 +1671,7 @@ func (m *NidOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRequiredexample } if (iNdEx + skippy) > l { @@ -2068,10 +2062,7 @@ func (m *NinOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRequiredexample } if (iNdEx + skippy) > l { @@ -2201,10 +2192,7 @@ func (m *NestedNinOptNative) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthRequiredexample - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthRequiredexample } if (iNdEx + skippy) > l { diff --git a/test/sizeunderscore/sizeunderscore.pb.go b/test/sizeunderscore/sizeunderscore.pb.go index e51ca10ab6..508d84340d 100644 --- a/test/sizeunderscore/sizeunderscore.pb.go +++ b/test/sizeunderscore/sizeunderscore.pb.go @@ -451,10 +451,7 @@ func (m *SizeMessage) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthSizeunderscore - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSizeunderscore } if (iNdEx + skippy) > l { diff --git a/test/theproto3/combos/both/theproto3.pb.go b/test/theproto3/combos/both/theproto3.pb.go index 7aa16af022..37c672df00 100644 --- a/test/theproto3/combos/both/theproto3.pb.go +++ b/test/theproto3/combos/both/theproto3.pb.go @@ -7019,7 +7019,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7170,7 +7170,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7187,10 +7187,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -7273,10 +7270,7 @@ func (m *Nested) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -7416,7 +7410,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7522,7 +7516,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7621,7 +7615,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7720,7 +7714,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7819,7 +7813,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7918,7 +7912,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8023,7 +8017,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8128,7 +8122,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8209,7 +8203,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8290,7 +8284,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8371,7 +8365,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8452,7 +8446,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8555,7 +8549,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8682,7 +8676,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8810,7 +8804,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8923,7 +8917,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9052,7 +9046,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9069,10 +9063,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -9212,7 +9203,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9318,7 +9309,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9417,7 +9408,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9516,7 +9507,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9615,7 +9606,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9714,7 +9705,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9819,7 +9810,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9924,7 +9915,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10005,7 +9996,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10086,7 +10077,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10167,7 +10158,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10248,7 +10239,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10351,7 +10342,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10478,7 +10469,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10606,7 +10597,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10719,7 +10710,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10848,7 +10839,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10865,10 +10856,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -11015,7 +11003,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -11133,7 +11121,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -11249,7 +11237,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -11266,10 +11254,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -11331,10 +11316,7 @@ func (m *FloatingPoint) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -11453,10 +11435,7 @@ func (m *Uint128Pair) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -11507,10 +11486,7 @@ func (m *ContainsNestedMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -11650,7 +11626,7 @@ func (m *ContainsNestedMap_NestedMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -11667,10 +11643,7 @@ func (m *ContainsNestedMap_NestedMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -11797,10 +11770,7 @@ func (m *NotPacked) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { diff --git a/test/theproto3/combos/unmarshaler/theproto3.pb.go b/test/theproto3/combos/unmarshaler/theproto3.pb.go index c27ff2c361..8b4e03a741 100644 --- a/test/theproto3/combos/unmarshaler/theproto3.pb.go +++ b/test/theproto3/combos/unmarshaler/theproto3.pb.go @@ -5698,7 +5698,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -5849,7 +5849,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -5866,10 +5866,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -5952,10 +5949,7 @@ func (m *Nested) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -6095,7 +6089,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6201,7 +6195,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6300,7 +6294,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6399,7 +6393,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6498,7 +6492,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6597,7 +6591,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6702,7 +6696,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6807,7 +6801,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6888,7 +6882,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -6969,7 +6963,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7050,7 +7044,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7131,7 +7125,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7234,7 +7228,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7361,7 +7355,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7489,7 +7483,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7602,7 +7596,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7731,7 +7725,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7748,10 +7742,7 @@ func (m *AllMaps) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -7891,7 +7882,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -7997,7 +7988,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8096,7 +8087,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8195,7 +8186,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8294,7 +8285,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8393,7 +8384,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8498,7 +8489,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8603,7 +8594,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8684,7 +8675,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8765,7 +8756,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8846,7 +8837,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -8927,7 +8918,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9030,7 +9021,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9157,7 +9148,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9285,7 +9276,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9398,7 +9389,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9527,7 +9518,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9544,10 +9535,7 @@ func (m *AllMapsOrdered) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -9694,7 +9682,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9812,7 +9800,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9928,7 +9916,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -9945,10 +9933,7 @@ func (m *MessageWithMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -10010,10 +9995,7 @@ func (m *FloatingPoint) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -10132,10 +10114,7 @@ func (m *Uint128Pair) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -10186,10 +10165,7 @@ func (m *ContainsNestedMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -10329,7 +10305,7 @@ func (m *ContainsNestedMap_NestedMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > postIndex { @@ -10346,10 +10322,7 @@ func (m *ContainsNestedMap_NestedMap) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { @@ -10476,10 +10449,7 @@ func (m *NotPacked) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTheproto3 } if (iNdEx + skippy) > l { diff --git a/test/typedecl/typedecl.pb.go b/test/typedecl/typedecl.pb.go index b733d849db..9184a49f92 100644 --- a/test/typedecl/typedecl.pb.go +++ b/test/typedecl/typedecl.pb.go @@ -729,10 +729,7 @@ func (m *Dropped) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypedecl - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypedecl } if (iNdEx + skippy) > l { @@ -820,10 +817,7 @@ func (m *DroppedWithoutGetters) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypedecl - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypedecl } if (iNdEx + skippy) > l { @@ -924,10 +918,7 @@ func (m *Kept) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypedecl - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypedecl } if (iNdEx + skippy) > l { diff --git a/test/typedecl_all/typedeclall.pb.go b/test/typedecl_all/typedeclall.pb.go index 545b11f8cd..1e08017d80 100644 --- a/test/typedecl_all/typedeclall.pb.go +++ b/test/typedecl_all/typedeclall.pb.go @@ -729,10 +729,7 @@ func (m *Dropped) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypedeclall - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypedeclall } if (iNdEx + skippy) > l { @@ -820,10 +817,7 @@ func (m *DroppedWithoutGetters) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypedeclall - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypedeclall } if (iNdEx + skippy) > l { @@ -924,10 +918,7 @@ func (m *Kept) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypedeclall - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypedeclall } if (iNdEx + skippy) > l { diff --git a/test/types/combos/both/types.pb.go b/test/types/combos/both/types.pb.go index bcfa037e62..b55bc517b9 100644 --- a/test/types/combos/both/types.pb.go +++ b/test/types/combos/both/types.pb.go @@ -12117,10 +12117,7 @@ func (m *KnownTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -12930,10 +12927,7 @@ func (m *ProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -13743,10 +13737,7 @@ func (m *StdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -14545,10 +14536,7 @@ func (m *RepProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -15347,10 +15335,7 @@ func (m *RepStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -15499,7 +15484,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15614,7 +15599,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15729,7 +15714,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15844,7 +15829,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15959,7 +15944,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16074,7 +16059,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16189,7 +16174,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16304,7 +16289,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16419,7 +16404,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16534,7 +16519,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16649,7 +16634,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16764,7 +16749,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16879,7 +16864,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16994,7 +16979,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17109,7 +17094,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17224,7 +17209,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17339,7 +17324,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17454,7 +17439,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17569,7 +17554,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17684,7 +17669,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17799,7 +17784,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17914,7 +17899,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17931,10 +17916,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -18082,7 +18064,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18196,7 +18178,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18310,7 +18292,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18424,7 +18406,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18538,7 +18520,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18652,7 +18634,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18766,7 +18748,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18880,7 +18862,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -18994,7 +18976,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19108,7 +19090,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19222,7 +19204,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19336,7 +19318,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19450,7 +19432,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19564,7 +19546,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19678,7 +19660,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19792,7 +19774,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -19906,7 +19888,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -20020,7 +20002,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -20134,7 +20116,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -20248,7 +20230,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -20362,7 +20344,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -20476,7 +20458,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -20493,10 +20475,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -20932,10 +20911,7 @@ func (m *OneofProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -21371,10 +21347,7 @@ func (m *OneofStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { diff --git a/test/types/combos/unmarshaler/types.pb.go b/test/types/combos/unmarshaler/types.pb.go index 29e89a7e6a..103e448b03 100644 --- a/test/types/combos/unmarshaler/types.pb.go +++ b/test/types/combos/unmarshaler/types.pb.go @@ -9114,10 +9114,7 @@ func (m *KnownTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -9927,10 +9924,7 @@ func (m *ProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -10740,10 +10734,7 @@ func (m *StdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -11542,10 +11533,7 @@ func (m *RepProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -12344,10 +12332,7 @@ func (m *RepStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -12496,7 +12481,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -12611,7 +12596,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -12726,7 +12711,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -12841,7 +12826,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -12956,7 +12941,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13071,7 +13056,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13186,7 +13171,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13301,7 +13286,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13416,7 +13401,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13531,7 +13516,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13646,7 +13631,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13761,7 +13746,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13876,7 +13861,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -13991,7 +13976,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14106,7 +14091,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14221,7 +14206,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14336,7 +14321,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14451,7 +14436,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14566,7 +14551,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14681,7 +14666,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14796,7 +14781,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14911,7 +14896,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -14928,10 +14913,7 @@ func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -15079,7 +15061,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15193,7 +15175,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15307,7 +15289,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15421,7 +15403,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15535,7 +15517,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15649,7 +15631,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15763,7 +15745,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15877,7 +15859,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -15991,7 +15973,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16105,7 +16087,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16219,7 +16201,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16333,7 +16315,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16447,7 +16429,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16561,7 +16543,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16675,7 +16657,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16789,7 +16771,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -16903,7 +16885,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17017,7 +16999,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17131,7 +17113,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17245,7 +17227,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17359,7 +17341,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17473,7 +17455,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { @@ -17490,10 +17472,7 @@ func (m *MapStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -17929,10 +17908,7 @@ func (m *OneofProtoTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -18368,10 +18344,7 @@ func (m *OneofStdTypes) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { diff --git a/test/unmarshalmerge/unmarshalmerge.pb.go b/test/unmarshalmerge/unmarshalmerge.pb.go index 84db558e79..b89044fdc6 100644 --- a/test/unmarshalmerge/unmarshalmerge.pb.go +++ b/test/unmarshalmerge/unmarshalmerge.pb.go @@ -1054,10 +1054,7 @@ func (m *Big) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnmarshalmerge } if (iNdEx + skippy) > l { @@ -1164,10 +1161,7 @@ func (m *BigUnsafe) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnmarshalmerge } if (iNdEx + skippy) > l { @@ -1238,10 +1232,7 @@ func (m *Sub) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnmarshalmerge } if (iNdEx + skippy) > l { @@ -1475,10 +1466,7 @@ func (m *IntMerge) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnmarshalmerge - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnmarshalmerge } if (iNdEx + skippy) > l { diff --git a/test/unrecognized/unrecognized.pb.go b/test/unrecognized/unrecognized.pb.go index 0029b38ffb..07c44305e8 100644 --- a/test/unrecognized/unrecognized.pb.go +++ b/test/unrecognized/unrecognized.pb.go @@ -3273,10 +3273,7 @@ func (m *A) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -3434,10 +3431,7 @@ func (m *B) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -3508,10 +3502,7 @@ func (m *D) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -3725,10 +3716,7 @@ func (m *C) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -3853,10 +3841,7 @@ func (m *U) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -3960,10 +3945,7 @@ func (m *OldA) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -4085,10 +4067,7 @@ func (m *OldB) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -4278,10 +4257,7 @@ func (m *OldC) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { @@ -4419,10 +4395,7 @@ func (m *OldU) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognized - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognized } if (iNdEx + skippy) > l { diff --git a/test/unrecognizedgroup/unrecognizedgroup.pb.go b/test/unrecognizedgroup/unrecognizedgroup.pb.go index 345059573a..b018f241d8 100644 --- a/test/unrecognizedgroup/unrecognizedgroup.pb.go +++ b/test/unrecognizedgroup/unrecognizedgroup.pb.go @@ -1651,10 +1651,7 @@ func (m *NewNoGroup) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognizedgroup } if (iNdEx + skippy) > l { @@ -1725,10 +1722,7 @@ func (m *A) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUnrecognizedgroup } if (iNdEx + skippy) > l { diff --git a/types/any.pb.go b/types/any.pb.go index 98e269d543..e3d4d9490f 100644 --- a/types/any.pb.go +++ b/types/any.pb.go @@ -592,10 +592,7 @@ func (m *Any) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAny - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAny } if (iNdEx + skippy) > l { diff --git a/types/api.pb.go b/types/api.pb.go index 58bf4b53b3..83e8869206 100644 --- a/types/api.pb.go +++ b/types/api.pb.go @@ -1677,10 +1677,7 @@ func (m *Api) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l { @@ -1920,10 +1917,7 @@ func (m *Method) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l { @@ -2038,10 +2032,7 @@ func (m *Mixin) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } if (iNdEx + skippy) > l { diff --git a/types/duration.pb.go b/types/duration.pb.go index 3959f06690..4deafcb1ce 100644 --- a/types/duration.pb.go +++ b/types/duration.pb.go @@ -415,10 +415,7 @@ func (m *Duration) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthDuration - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthDuration } if (iNdEx + skippy) > l { diff --git a/types/empty.pb.go b/types/empty.pb.go index 17e3aa5583..9e94748b3a 100644 --- a/types/empty.pb.go +++ b/types/empty.pb.go @@ -360,10 +360,7 @@ func (m *Empty) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthEmpty - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthEmpty } if (iNdEx + skippy) > l { diff --git a/types/field_mask.pb.go b/types/field_mask.pb.go index 7226b57f73..6ae346d925 100644 --- a/types/field_mask.pb.go +++ b/types/field_mask.pb.go @@ -636,10 +636,7 @@ func (m *FieldMask) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthFieldMask - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthFieldMask } if (iNdEx + skippy) > l { diff --git a/types/source_context.pb.go b/types/source_context.pb.go index 61045ce10d..8e6ce71b27 100644 --- a/types/source_context.pb.go +++ b/types/source_context.pb.go @@ -422,10 +422,7 @@ func (m *SourceContext) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthSourceContext - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSourceContext } if (iNdEx + skippy) > l { diff --git a/types/struct.pb.go b/types/struct.pb.go index cea553eef6..c0457312e6 100644 --- a/types/struct.pb.go +++ b/types/struct.pb.go @@ -1862,7 +1862,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthStruct } if (iNdEx + skippy) > postIndex { @@ -1879,10 +1879,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthStruct } if (iNdEx + skippy) > l { @@ -2087,10 +2084,7 @@ func (m *Value) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthStruct } if (iNdEx + skippy) > l { @@ -2175,10 +2169,7 @@ func (m *ListValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthStruct } if (iNdEx + skippy) > l { diff --git a/types/timestamp.pb.go b/types/timestamp.pb.go index b818752670..45db7b3bb1 100644 --- a/types/timestamp.pb.go +++ b/types/timestamp.pb.go @@ -437,10 +437,7 @@ func (m *Timestamp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTimestamp - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTimestamp } if (iNdEx + skippy) > l { diff --git a/types/type.pb.go b/types/type.pb.go index 13b7ec02f7..791427bb22 100644 --- a/types/type.pb.go +++ b/types/type.pb.go @@ -2483,10 +2483,7 @@ func (m *Type) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthType } if (iNdEx + skippy) > l { @@ -2795,10 +2792,7 @@ func (m *Field) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthType } if (iNdEx + skippy) > l { @@ -3004,10 +2998,7 @@ func (m *Enum) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthType } if (iNdEx + skippy) > l { @@ -3143,10 +3134,7 @@ func (m *EnumValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthType } if (iNdEx + skippy) > l { @@ -3265,10 +3253,7 @@ func (m *Option) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthType } if (iNdEx + skippy) > l { diff --git a/types/wrappers.pb.go b/types/wrappers.pb.go index 8f1edb57d3..8d415420a7 100644 --- a/types/wrappers.pb.go +++ b/types/wrappers.pb.go @@ -2020,10 +2020,7 @@ func (m *DoubleValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2085,10 +2082,7 @@ func (m *FloatValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2158,10 +2152,7 @@ func (m *Int64Value) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2231,10 +2222,7 @@ func (m *UInt64Value) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2304,10 +2292,7 @@ func (m *Int32Value) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2377,10 +2362,7 @@ func (m *UInt32Value) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2451,10 +2433,7 @@ func (m *BoolValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2537,10 +2516,7 @@ func (m *StringValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { @@ -2625,10 +2601,7 @@ func (m *BytesValue) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthWrappers } if (iNdEx + skippy) > l { diff --git a/vanity/test/fast/gogovanity.pb.go b/vanity/test/fast/gogovanity.pb.go index 2a2924a8e5..6c08c10bef 100644 --- a/vanity/test/fast/gogovanity.pb.go +++ b/vanity/test/fast/gogovanity.pb.go @@ -299,10 +299,7 @@ func (m *B) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGogovanity } if (iNdEx + skippy) > l { diff --git a/vanity/test/fast/proto3.pb.go b/vanity/test/fast/proto3.pb.go index 7d9f6b5dd5..3643b6fe74 100644 --- a/vanity/test/fast/proto3.pb.go +++ b/vanity/test/fast/proto3.pb.go @@ -219,10 +219,7 @@ func (m *Aproto3) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProto3 } if (iNdEx + skippy) > l { diff --git a/vanity/test/fast/vanity.pb.go b/vanity/test/fast/vanity.pb.go index 34b6e80ef1..ad09c9c33f 100644 --- a/vanity/test/fast/vanity.pb.go +++ b/vanity/test/fast/vanity.pb.go @@ -262,10 +262,7 @@ func (m *A) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthVanity } if (iNdEx + skippy) > l { diff --git a/vanity/test/faster/gogovanity.pb.go b/vanity/test/faster/gogovanity.pb.go index a00e4163bd..ef689dd737 100644 --- a/vanity/test/faster/gogovanity.pb.go +++ b/vanity/test/faster/gogovanity.pb.go @@ -285,10 +285,7 @@ func (m *B) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGogovanity } if (iNdEx + skippy) > l { diff --git a/vanity/test/faster/proto3.pb.go b/vanity/test/faster/proto3.pb.go index 4b6a0d8e0b..83c5a46034 100644 --- a/vanity/test/faster/proto3.pb.go +++ b/vanity/test/faster/proto3.pb.go @@ -209,10 +209,7 @@ func (m *Aproto3) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProto3 } if (iNdEx + skippy) > l { diff --git a/vanity/test/faster/vanity.pb.go b/vanity/test/faster/vanity.pb.go index 5380e22527..053961782d 100644 --- a/vanity/test/faster/vanity.pb.go +++ b/vanity/test/faster/vanity.pb.go @@ -241,10 +241,7 @@ func (m *A) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthVanity } if (iNdEx + skippy) > l { diff --git a/vanity/test/slick/gogovanity.pb.go b/vanity/test/slick/gogovanity.pb.go index bf5915fb81..8849f3f95b 100644 --- a/vanity/test/slick/gogovanity.pb.go +++ b/vanity/test/slick/gogovanity.pb.go @@ -374,10 +374,7 @@ func (m *B) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGogovanity - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGogovanity } if (iNdEx + skippy) > l { diff --git a/vanity/test/slick/proto3.pb.go b/vanity/test/slick/proto3.pb.go index e8b034c7cd..4326b3937a 100644 --- a/vanity/test/slick/proto3.pb.go +++ b/vanity/test/slick/proto3.pb.go @@ -272,10 +272,7 @@ func (m *Aproto3) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthProto3 - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProto3 } if (iNdEx + skippy) > l { diff --git a/vanity/test/slick/vanity.pb.go b/vanity/test/slick/vanity.pb.go index 88b55bf45a..8b4c015acb 100644 --- a/vanity/test/slick/vanity.pb.go +++ b/vanity/test/slick/vanity.pb.go @@ -309,10 +309,7 @@ func (m *A) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthVanity - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthVanity } if (iNdEx + skippy) > l {