|
@@ -19,16 +19,19 @@
|
|
|
*/
|
|
*/
|
|
|
package raftpb
|
|
package raftpb
|
|
|
|
|
|
|
|
-import proto "github.com/coreos/etcd/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
|
|
|
|
|
-import math "math"
|
|
|
|
|
|
|
+import (
|
|
|
|
|
+ "fmt"
|
|
|
|
|
+
|
|
|
|
|
+ proto "github.com/coreos/etcd/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
|
|
|
|
|
+)
|
|
|
|
|
|
|
|
-// discarding unused import gogoproto "github.com/coreos/etcd/Godeps/_workspace/src/gogoproto"
|
|
|
|
|
|
|
+import math "math"
|
|
|
|
|
|
|
|
import io "io"
|
|
import io "io"
|
|
|
-import fmt "fmt"
|
|
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
var _ = proto.Marshal
|
|
var _ = proto.Marshal
|
|
|
|
|
+var _ = fmt.Errorf
|
|
|
var _ = math.Inf
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
type EntryType int32
|
|
type EntryType int32
|
|
@@ -167,10 +170,10 @@ func (x *ConfChangeType) UnmarshalJSON(data []byte) error {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type Entry struct {
|
|
type Entry struct {
|
|
|
- Type EntryType `protobuf:"varint,1,opt,enum=raftpb.EntryType" json:"Type"`
|
|
|
|
|
- Term uint64 `protobuf:"varint,2,opt" json:"Term"`
|
|
|
|
|
- Index uint64 `protobuf:"varint,3,opt" json:"Index"`
|
|
|
|
|
- Data []byte `protobuf:"bytes,4,opt" json:"Data,omitempty"`
|
|
|
|
|
|
|
+ Type EntryType `protobuf:"varint,1,opt,name=Type,enum=raftpb.EntryType" json:"Type"`
|
|
|
|
|
+ Term uint64 `protobuf:"varint,2,opt,name=Term" json:"Term"`
|
|
|
|
|
+ Index uint64 `protobuf:"varint,3,opt,name=Index" json:"Index"`
|
|
|
|
|
+ Data []byte `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"`
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -239,10 +242,10 @@ func (m *ConfState) String() string { return proto.CompactTextString(m) }
|
|
|
func (*ConfState) ProtoMessage() {}
|
|
func (*ConfState) ProtoMessage() {}
|
|
|
|
|
|
|
|
type ConfChange struct {
|
|
type ConfChange struct {
|
|
|
- ID uint64 `protobuf:"varint,1,opt" json:"ID"`
|
|
|
|
|
- Type ConfChangeType `protobuf:"varint,2,opt,enum=raftpb.ConfChangeType" json:"Type"`
|
|
|
|
|
- NodeID uint64 `protobuf:"varint,3,opt" json:"NodeID"`
|
|
|
|
|
- Context []byte `protobuf:"bytes,4,opt" json:"Context,omitempty"`
|
|
|
|
|
|
|
+ ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"`
|
|
|
|
|
+ Type ConfChangeType `protobuf:"varint,2,opt,name=Type,enum=raftpb.ConfChangeType" json:"Type"`
|
|
|
|
|
+ NodeID uint64 `protobuf:"varint,3,opt,name=NodeID" json:"NodeID"`
|
|
|
|
|
+ Context []byte `protobuf:"bytes,4,opt,name=Context" json:"Context,omitempty"`
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -251,6 +254,13 @@ func (m *ConfChange) String() string { return proto.CompactTextString(m) }
|
|
|
func (*ConfChange) ProtoMessage() {}
|
|
func (*ConfChange) ProtoMessage() {}
|
|
|
|
|
|
|
|
func init() {
|
|
func init() {
|
|
|
|
|
+ proto.RegisterType((*Entry)(nil), "raftpb.Entry")
|
|
|
|
|
+ proto.RegisterType((*SnapshotMetadata)(nil), "raftpb.SnapshotMetadata")
|
|
|
|
|
+ proto.RegisterType((*Snapshot)(nil), "raftpb.Snapshot")
|
|
|
|
|
+ proto.RegisterType((*Message)(nil), "raftpb.Message")
|
|
|
|
|
+ proto.RegisterType((*HardState)(nil), "raftpb.HardState")
|
|
|
|
|
+ proto.RegisterType((*ConfState)(nil), "raftpb.ConfState")
|
|
|
|
|
+ proto.RegisterType((*ConfChange)(nil), "raftpb.ConfChange")
|
|
|
proto.RegisterEnum("raftpb.EntryType", EntryType_name, EntryType_value)
|
|
proto.RegisterEnum("raftpb.EntryType", EntryType_name, EntryType_value)
|
|
|
proto.RegisterEnum("raftpb.MessageType", MessageType_name, MessageType_value)
|
|
proto.RegisterEnum("raftpb.MessageType", MessageType_name, MessageType_value)
|
|
|
proto.RegisterEnum("raftpb.ConfChangeType", ConfChangeType_name, ConfChangeType_value)
|
|
proto.RegisterEnum("raftpb.ConfChangeType", ConfChangeType_name, ConfChangeType_value)
|
|
@@ -684,8 +694,12 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
l := len(data)
|
|
|
iNdEx := 0
|
|
iNdEx := 0
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
|
|
+ preIndex := iNdEx
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -698,6 +712,12 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
fieldNum := int32(wire >> 3)
|
|
fieldNum := int32(wire >> 3)
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
|
|
+ if wireType == 4 {
|
|
|
|
|
+ return fmt.Errorf("proto: Entry: wiretype end group for non-group")
|
|
|
|
|
+ }
|
|
|
|
|
+ if fieldNum <= 0 {
|
|
|
|
|
+ return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
|
+ }
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
@@ -705,6 +725,9 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Type = 0
|
|
m.Type = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -721,6 +744,9 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Term = 0
|
|
m.Term = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -737,6 +763,9 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Index = 0
|
|
m.Index = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -753,6 +782,9 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var byteLen int
|
|
var byteLen int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -770,18 +802,13 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
if postIndex > l {
|
|
if postIndex > l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
- m.Data = append([]byte{}, data[iNdEx:postIndex]...)
|
|
|
|
|
|
|
+ m.Data = append(m.Data[:0], data[iNdEx:postIndex]...)
|
|
|
|
|
+ if m.Data == nil {
|
|
|
|
|
+ m.Data = []byte{}
|
|
|
|
|
+ }
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
default:
|
|
default:
|
|
|
- var sizeOfWire int
|
|
|
|
|
- for {
|
|
|
|
|
- sizeOfWire++
|
|
|
|
|
- wire >>= 7
|
|
|
|
|
- if wire == 0 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- iNdEx -= sizeOfWire
|
|
|
|
|
|
|
+ iNdEx = preIndex
|
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -797,14 +824,21 @@ func (m *Entry) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if iNdEx > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
l := len(data)
|
|
|
iNdEx := 0
|
|
iNdEx := 0
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
|
|
+ preIndex := iNdEx
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -817,6 +851,12 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
fieldNum := int32(wire >> 3)
|
|
fieldNum := int32(wire >> 3)
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
|
|
+ if wireType == 4 {
|
|
|
|
|
+ return fmt.Errorf("proto: SnapshotMetadata: wiretype end group for non-group")
|
|
|
|
|
+ }
|
|
|
|
|
+ if fieldNum <= 0 {
|
|
|
|
|
+ return fmt.Errorf("proto: SnapshotMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
|
+ }
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 2 {
|
|
if wireType != 2 {
|
|
@@ -824,6 +864,9 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var msglen int
|
|
var msglen int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -851,6 +894,9 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Index = 0
|
|
m.Index = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -867,6 +913,9 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Term = 0
|
|
m.Term = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -878,15 +927,7 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
|
- var sizeOfWire int
|
|
|
|
|
- for {
|
|
|
|
|
- sizeOfWire++
|
|
|
|
|
- wire >>= 7
|
|
|
|
|
- if wire == 0 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- iNdEx -= sizeOfWire
|
|
|
|
|
|
|
+ iNdEx = preIndex
|
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -902,14 +943,21 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if iNdEx > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
func (m *Snapshot) Unmarshal(data []byte) error {
|
|
func (m *Snapshot) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
l := len(data)
|
|
|
iNdEx := 0
|
|
iNdEx := 0
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
|
|
+ preIndex := iNdEx
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -922,6 +970,12 @@ func (m *Snapshot) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
fieldNum := int32(wire >> 3)
|
|
fieldNum := int32(wire >> 3)
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
|
|
+ if wireType == 4 {
|
|
|
|
|
+ return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
|
|
|
|
|
+ }
|
|
|
|
|
+ if fieldNum <= 0 {
|
|
|
|
|
+ return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
|
+ }
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 2 {
|
|
if wireType != 2 {
|
|
@@ -929,6 +983,9 @@ func (m *Snapshot) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var byteLen int
|
|
var byteLen int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -946,7 +1003,10 @@ func (m *Snapshot) Unmarshal(data []byte) error {
|
|
|
if postIndex > l {
|
|
if postIndex > l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
- m.Data = append([]byte{}, data[iNdEx:postIndex]...)
|
|
|
|
|
|
|
+ m.Data = append(m.Data[:0], data[iNdEx:postIndex]...)
|
|
|
|
|
+ if m.Data == nil {
|
|
|
|
|
+ m.Data = []byte{}
|
|
|
|
|
+ }
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
case 2:
|
|
case 2:
|
|
|
if wireType != 2 {
|
|
if wireType != 2 {
|
|
@@ -954,6 +1014,9 @@ func (m *Snapshot) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var msglen int
|
|
var msglen int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -976,15 +1039,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
default:
|
|
default:
|
|
|
- var sizeOfWire int
|
|
|
|
|
- for {
|
|
|
|
|
- sizeOfWire++
|
|
|
|
|
- wire >>= 7
|
|
|
|
|
- if wire == 0 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- iNdEx -= sizeOfWire
|
|
|
|
|
|
|
+ iNdEx = preIndex
|
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -1000,14 +1055,21 @@ func (m *Snapshot) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if iNdEx > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
func (m *Message) Unmarshal(data []byte) error {
|
|
func (m *Message) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
l := len(data)
|
|
|
iNdEx := 0
|
|
iNdEx := 0
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
|
|
+ preIndex := iNdEx
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1020,6 +1082,12 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
fieldNum := int32(wire >> 3)
|
|
fieldNum := int32(wire >> 3)
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
|
|
+ if wireType == 4 {
|
|
|
|
|
+ return fmt.Errorf("proto: Message: wiretype end group for non-group")
|
|
|
|
|
+ }
|
|
|
|
|
+ if fieldNum <= 0 {
|
|
|
|
|
+ return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
|
+ }
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
@@ -1027,6 +1095,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Type = 0
|
|
m.Type = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1043,6 +1114,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.To = 0
|
|
m.To = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1059,6 +1133,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.From = 0
|
|
m.From = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1075,6 +1152,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Term = 0
|
|
m.Term = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1091,6 +1171,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.LogTerm = 0
|
|
m.LogTerm = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1107,6 +1190,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Index = 0
|
|
m.Index = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1123,6 +1209,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var msglen int
|
|
var msglen int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1151,6 +1240,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Commit = 0
|
|
m.Commit = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1167,6 +1259,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var msglen int
|
|
var msglen int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1194,6 +1289,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var v int
|
|
var v int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1211,6 +1309,9 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.RejectHint = 0
|
|
m.RejectHint = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1222,15 +1323,7 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
|
- var sizeOfWire int
|
|
|
|
|
- for {
|
|
|
|
|
- sizeOfWire++
|
|
|
|
|
- wire >>= 7
|
|
|
|
|
- if wire == 0 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- iNdEx -= sizeOfWire
|
|
|
|
|
|
|
+ iNdEx = preIndex
|
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -1246,14 +1339,21 @@ func (m *Message) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if iNdEx > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
func (m *HardState) Unmarshal(data []byte) error {
|
|
func (m *HardState) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
l := len(data)
|
|
|
iNdEx := 0
|
|
iNdEx := 0
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
|
|
+ preIndex := iNdEx
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1266,6 +1366,12 @@ func (m *HardState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
fieldNum := int32(wire >> 3)
|
|
fieldNum := int32(wire >> 3)
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
|
|
+ if wireType == 4 {
|
|
|
|
|
+ return fmt.Errorf("proto: HardState: wiretype end group for non-group")
|
|
|
|
|
+ }
|
|
|
|
|
+ if fieldNum <= 0 {
|
|
|
|
|
+ return fmt.Errorf("proto: HardState: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
|
+ }
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
@@ -1273,6 +1379,9 @@ func (m *HardState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Term = 0
|
|
m.Term = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1289,6 +1398,9 @@ func (m *HardState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Vote = 0
|
|
m.Vote = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1305,6 +1417,9 @@ func (m *HardState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Commit = 0
|
|
m.Commit = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1316,15 +1431,7 @@ func (m *HardState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
default:
|
|
default:
|
|
|
- var sizeOfWire int
|
|
|
|
|
- for {
|
|
|
|
|
- sizeOfWire++
|
|
|
|
|
- wire >>= 7
|
|
|
|
|
- if wire == 0 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- iNdEx -= sizeOfWire
|
|
|
|
|
|
|
+ iNdEx = preIndex
|
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -1340,14 +1447,21 @@ func (m *HardState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if iNdEx > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
func (m *ConfState) Unmarshal(data []byte) error {
|
|
func (m *ConfState) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
l := len(data)
|
|
|
iNdEx := 0
|
|
iNdEx := 0
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
|
|
+ preIndex := iNdEx
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1360,6 +1474,12 @@ func (m *ConfState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
fieldNum := int32(wire >> 3)
|
|
fieldNum := int32(wire >> 3)
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
|
|
+ if wireType == 4 {
|
|
|
|
|
+ return fmt.Errorf("proto: ConfState: wiretype end group for non-group")
|
|
|
|
|
+ }
|
|
|
|
|
+ if fieldNum <= 0 {
|
|
|
|
|
+ return fmt.Errorf("proto: ConfState: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
|
+ }
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
@@ -1367,6 +1487,9 @@ func (m *ConfState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var v uint64
|
|
var v uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1379,15 +1502,7 @@ func (m *ConfState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Nodes = append(m.Nodes, v)
|
|
m.Nodes = append(m.Nodes, v)
|
|
|
default:
|
|
default:
|
|
|
- var sizeOfWire int
|
|
|
|
|
- for {
|
|
|
|
|
- sizeOfWire++
|
|
|
|
|
- wire >>= 7
|
|
|
|
|
- if wire == 0 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- iNdEx -= sizeOfWire
|
|
|
|
|
|
|
+ iNdEx = preIndex
|
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -1403,14 +1518,21 @@ func (m *ConfState) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if iNdEx > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
func (m *ConfChange) Unmarshal(data []byte) error {
|
|
func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
l := len(data)
|
|
|
iNdEx := 0
|
|
iNdEx := 0
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
|
|
+ preIndex := iNdEx
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1423,6 +1545,12 @@ func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
fieldNum := int32(wire >> 3)
|
|
fieldNum := int32(wire >> 3)
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
|
|
+ if wireType == 4 {
|
|
|
|
|
+ return fmt.Errorf("proto: ConfChange: wiretype end group for non-group")
|
|
|
|
|
+ }
|
|
|
|
|
+ if fieldNum <= 0 {
|
|
|
|
|
+ return fmt.Errorf("proto: ConfChange: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
|
+ }
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
@@ -1430,6 +1558,9 @@ func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.ID = 0
|
|
m.ID = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1446,6 +1577,9 @@ func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.Type = 0
|
|
m.Type = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1462,6 +1596,9 @@ func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
m.NodeID = 0
|
|
m.NodeID = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1478,6 +1615,9 @@ func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
var byteLen int
|
|
var byteLen int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1495,18 +1635,13 @@ func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
if postIndex > l {
|
|
if postIndex > l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
- m.Context = append([]byte{}, data[iNdEx:postIndex]...)
|
|
|
|
|
|
|
+ m.Context = append(m.Context[:0], data[iNdEx:postIndex]...)
|
|
|
|
|
+ if m.Context == nil {
|
|
|
|
|
+ m.Context = []byte{}
|
|
|
|
|
+ }
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
default:
|
|
default:
|
|
|
- var sizeOfWire int
|
|
|
|
|
- for {
|
|
|
|
|
- sizeOfWire++
|
|
|
|
|
- wire >>= 7
|
|
|
|
|
- if wire == 0 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- iNdEx -= sizeOfWire
|
|
|
|
|
|
|
+ iNdEx = preIndex
|
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
skippy, err := skipRaft(data[iNdEx:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -1522,6 +1657,9 @@ func (m *ConfChange) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if iNdEx > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
func skipRaft(data []byte) (n int, err error) {
|
|
func skipRaft(data []byte) (n int, err error) {
|
|
@@ -1530,6 +1668,9 @@ func skipRaft(data []byte) (n int, err error) {
|
|
|
for iNdEx < l {
|
|
for iNdEx < l {
|
|
|
var wire uint64
|
|
var wire uint64
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return 0, ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1543,7 +1684,10 @@ func skipRaft(data []byte) (n int, err error) {
|
|
|
wireType := int(wire & 0x7)
|
|
wireType := int(wire & 0x7)
|
|
|
switch wireType {
|
|
switch wireType {
|
|
|
case 0:
|
|
case 0:
|
|
|
- for {
|
|
|
|
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return 0, ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1559,6 +1703,9 @@ func skipRaft(data []byte) (n int, err error) {
|
|
|
case 2:
|
|
case 2:
|
|
|
var length int
|
|
var length int
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return 0, ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1579,6 +1726,9 @@ func skipRaft(data []byte) (n int, err error) {
|
|
|
var innerWire uint64
|
|
var innerWire uint64
|
|
|
var start int = iNdEx
|
|
var start int = iNdEx
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return 0, ErrIntOverflowRaft
|
|
|
|
|
+ }
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
@@ -1614,4 +1764,5 @@ func skipRaft(data []byte) (n int, err error) {
|
|
|
|
|
|
|
|
var (
|
|
var (
|
|
|
ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
|
+ ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow")
|
|
|
)
|
|
)
|