Commit ccdfd363 authored by Levin Zimmermann's avatar Levin Zimmermann

fixup! proto/msgpack: Fix encoding INVALID_{TID,OID}

This is the decoding part of 37dd83e9
parent d779695c
...@@ -1095,13 +1095,18 @@ func (d *decoderM) expectEnum(assignto string, enumType int) { ...@@ -1095,13 +1095,18 @@ func (d *decoderM) expectEnum(assignto string, enumType int) {
} }
func (d *decoderM) genBasic(assignto string, typ *types.Basic, userType types.Type) { func (d *decoderM) genBasic(assignto string, typ *types.Basic, userType types.Type) {
// zodb.Tid and zodb.Oid are encoded as [8]bin // zodb.Tid and zodb.Oid are encoded as [8]bin or Nil
if userType == zodbTid || userType == zodbOid { if userType == zodbTid || userType == zodbOid {
d.emit("if data[%v] == byte(msgpack.Nil) {", d.n)
d.emit("%s = %s(%v)", assignto, typeName(userType), INVALID_ID)
d.emit("data = data[%v:]", d.n + 1)
d.emit("} else {")
d.expectBin8Fix(assignto, 8) d.expectBin8Fix(assignto, 8)
d.emit("%s= %s(binary.BigEndian.Uint64(data[%v:]))", assignto, typeName(userType), d.n) d.emit("%s= %s(binary.BigEndian.Uint64(data[%v:]))", assignto, typeName(userType), d.n)
d.n += 8 d.n += 8
d.overflow.Add(8) d.overflow.Add(8)
d.resetPos()
d.emit("}")
return return
} }
......
...@@ -1452,20 +1452,32 @@ func (p *AnswerRecovery) neoMsgDecodeM(data []byte) (int, error) { ...@@ -1452,20 +1452,32 @@ func (p *AnswerRecovery) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 20 { if len(data) < 20 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerRecovery.BackupTid", op, msgpack.Bin8) p.BackupTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerRecovery.BackupTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerRecovery.BackupTid", op, msgpack.Bin8)
p.BackupTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerRecovery.TruncateTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerRecovery.BackupTid", l, 8)
}
p.BackupTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerRecovery.TruncateTid", l, 8) p.TruncateTid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerRecovery.TruncateTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerRecovery.TruncateTid", l, 8)
}
p.TruncateTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.TruncateTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21 + int(nread), nil return 21 + int(nread), nil
overflow: overflow:
...@@ -1595,20 +1607,32 @@ func (p *AnswerLastIDs) neoMsgDecodeM(data []byte) (int, error) { ...@@ -1595,20 +1607,32 @@ func (p *AnswerLastIDs) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerLastIDs.LastOid", op, msgpack.Bin8) p.LastOid = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerLastIDs.LastOid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerLastIDs.LastOid", op, msgpack.Bin8)
p.LastOid = zodb.Oid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerLastIDs.LastTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerLastIDs.LastOid", l, 8)
}
p.LastOid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerLastIDs.LastTid", l, 8) p.LastTid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerLastIDs.LastTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerLastIDs.LastTid", l, 8)
}
p.LastTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.LastTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -2712,15 +2736,20 @@ func (p *AnswerUnfinishedTransactions) neoMsgDecodeM(data []byte) (int, error) { ...@@ -2712,15 +2736,20 @@ func (p *AnswerUnfinishedTransactions) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerUnfinishedTransactions.MaxTID", op, msgpack.Bin8) p.MaxTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerUnfinishedTransactions.MaxTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerUnfinishedTransactions.MaxTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerUnfinishedTransactions.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerUnfinishedTransactions.TidList", err) return 0, mdecodeErr("AnswerUnfinishedTransactions.TidList", err)
...@@ -2744,14 +2773,19 @@ func (p *AnswerUnfinishedTransactions) neoMsgDecodeM(data []byte) (int, error) { ...@@ -2744,14 +2773,19 @@ func (p *AnswerUnfinishedTransactions) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerUnfinishedTransactions.UnfinishedTID", op, msgpack.Bin8) (*a).UnfinishedTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerUnfinishedTransactions.UnfinishedTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerUnfinishedTransactions.UnfinishedTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerUnfinishedTransactions.UnfinishedTID", l, 8)
}
(*a).UnfinishedTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a).UnfinishedTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 11 + int(nread), nil return 11 + int(nread), nil
...@@ -2928,21 +2962,32 @@ func (p *AnswerLockedTransactions) neoMsgDecodeM(data []byte) (int, error) { ...@@ -2928,21 +2962,32 @@ func (p *AnswerLockedTransactions) neoMsgDecodeM(data []byte) (int, error) {
m := p.TidDict m := p.TidDict
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
var key zodb.Tid var key zodb.Tid
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerLockedTransactions", op, msgpack.Bin8) key = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerLockedTransactions", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerLockedTransactions", op, msgpack.Bin8)
key = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerLockedTransactions", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerLockedTransactions", l, 8)
}
key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerLockedTransactions", l, 8) m[key] = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerLockedTransactions", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerLockedTransactions", l, 8)
}
m[key] = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
m[key] = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
data = data[20:]
} }
} }
return 1 + int(nread), nil return 1 + int(nread), nil
...@@ -3013,13 +3058,19 @@ func (p *FinalTID) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3013,13 +3058,19 @@ func (p *FinalTID) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FinalTID.TTID", op, msgpack.Bin8) p.TTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FinalTID.TTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FinalTID.TTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FinalTID.TTID", l, 8)
}
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -3088,13 +3139,19 @@ func (p *AnswerFinalTID) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3088,13 +3139,19 @@ func (p *AnswerFinalTID) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerFinalTID.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerFinalTID.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerFinalTID.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerFinalTID.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -3179,20 +3236,32 @@ func (p *ValidateTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3179,20 +3236,32 @@ func (p *ValidateTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("ValidateTransaction.TTID", op, msgpack.Bin8) p.TTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("ValidateTransaction.TTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("ValidateTransaction.TTID", op, msgpack.Bin8)
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("ValidateTransaction.Tid", op, msgpack.Bin8) return 0, mdecodeLen8Err("ValidateTransaction.TTID", l, 8)
}
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("ValidateTransaction.Tid", l, 8) p.Tid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("ValidateTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("ValidateTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -3261,13 +3330,19 @@ func (p *BeginTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3261,13 +3330,19 @@ func (p *BeginTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("BeginTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("BeginTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("BeginTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("BeginTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -3336,13 +3411,19 @@ func (p *AnswerBeginTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3336,13 +3411,19 @@ func (p *AnswerBeginTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerBeginTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerBeginTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerBeginTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerBeginTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -3453,15 +3534,20 @@ func (p *FailedVote) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3453,15 +3534,20 @@ func (p *FailedVote) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FailedVote.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FailedVote.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FailedVote.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FailedVote.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("FailedVote.NodeList", err) return 0, mdecodeErr("FailedVote.NodeList", err)
...@@ -3634,15 +3720,20 @@ func (p *FinishTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3634,15 +3720,20 @@ func (p *FinishTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FinishTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FinishTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FinishTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FinishTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("FinishTransaction.OIDList", err) return 0, mdecodeErr("FinishTransaction.OIDList", err)
...@@ -3656,14 +3747,19 @@ func (p *FinishTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3656,14 +3747,19 @@ func (p *FinishTransaction) neoMsgDecodeM(data []byte) (int, error) {
p.OIDList = make([]zodb.Oid, l) p.OIDList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OIDList[i] a := &p.OIDList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FinishTransaction", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FinishTransaction", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FinishTransaction", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FinishTransaction", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
{ {
...@@ -3680,14 +3776,19 @@ func (p *FinishTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3680,14 +3776,19 @@ func (p *FinishTransaction) neoMsgDecodeM(data []byte) (int, error) {
p.CheckedList = make([]zodb.Oid, l) p.CheckedList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.CheckedList[i] a := &p.CheckedList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FinishTransaction", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FinishTransaction", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FinishTransaction", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FinishTransaction", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 11 + int(nread), nil return 11 + int(nread), nil
...@@ -3774,20 +3875,32 @@ func (p *AnswerTransactionFinished) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3774,20 +3875,32 @@ func (p *AnswerTransactionFinished) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerTransactionFinished.TTid", op, msgpack.Bin8) p.TTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerTransactionFinished.TTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerTransactionFinished.TTid", op, msgpack.Bin8)
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerTransactionFinished.Tid", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerTransactionFinished.TTid", l, 8)
}
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerTransactionFinished.Tid", l, 8) p.Tid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerTransactionFinished.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerTransactionFinished.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -3872,20 +3985,32 @@ func (p *LockInformation) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3872,20 +3985,32 @@ func (p *LockInformation) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("LockInformation.Ttid", op, msgpack.Bin8) p.Ttid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("LockInformation.Ttid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("LockInformation.Ttid", op, msgpack.Bin8)
p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("LockInformation.Tid", op, msgpack.Bin8) return 0, mdecodeLen8Err("LockInformation.Ttid", l, 8)
}
p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("LockInformation.Tid", l, 8) p.Tid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("LockInformation.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("LockInformation.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -3954,13 +4079,19 @@ func (p *AnswerInformationLocked) neoMsgDecodeM(data []byte) (int, error) { ...@@ -3954,13 +4079,19 @@ func (p *AnswerInformationLocked) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerInformationLocked.Ttid", op, msgpack.Bin8) p.Ttid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerInformationLocked.Ttid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerInformationLocked.Ttid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerInformationLocked.Ttid", l, 8)
}
p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Ttid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -4072,15 +4203,20 @@ func (p *InvalidateObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4072,15 +4203,20 @@ func (p *InvalidateObjects) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("InvalidateObjects.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("InvalidateObjects.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("InvalidateObjects.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("InvalidateObjects.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("InvalidateObjects.OidList", err) return 0, mdecodeErr("InvalidateObjects.OidList", err)
...@@ -4094,14 +4230,19 @@ func (p *InvalidateObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4094,14 +4230,19 @@ func (p *InvalidateObjects) neoMsgDecodeM(data []byte) (int, error) {
p.OidList = make([]zodb.Oid, l) p.OidList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OidList[i] a := &p.OidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("InvalidateObjects", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("InvalidateObjects", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("InvalidateObjects", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("InvalidateObjects", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 11 + int(nread), nil return 11 + int(nread), nil
...@@ -4172,13 +4313,19 @@ func (p *NotifyUnlockInformation) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4172,13 +4313,19 @@ func (p *NotifyUnlockInformation) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("NotifyUnlockInformation.TTID", op, msgpack.Bin8) p.TTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("NotifyUnlockInformation.TTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("NotifyUnlockInformation.TTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("NotifyUnlockInformation.TTID", l, 8)
}
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -4354,14 +4501,19 @@ func (p *AnswerNewOIDs) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4354,14 +4501,19 @@ func (p *AnswerNewOIDs) neoMsgDecodeM(data []byte) (int, error) {
p.OidList = make([]zodb.Oid, l) p.OidList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OidList[i] a := &p.OidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerNewOIDs", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerNewOIDs", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerNewOIDs", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerNewOIDs", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 1 + int(nread), nil return 1 + int(nread), nil
...@@ -4448,20 +4600,32 @@ func (p *NotifyDeadlock) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4448,20 +4600,32 @@ func (p *NotifyDeadlock) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("NotifyDeadlock.TTid", op, msgpack.Bin8) p.TTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("NotifyDeadlock.TTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("NotifyDeadlock.TTid", op, msgpack.Bin8)
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("NotifyDeadlock.LockingTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("NotifyDeadlock.TTid", l, 8)
}
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("NotifyDeadlock.LockingTid", l, 8) p.LockingTid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("NotifyDeadlock.LockingTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("NotifyDeadlock.LockingTid", l, 8)
}
p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -4546,20 +4710,32 @@ func (p *RebaseTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4546,20 +4710,32 @@ func (p *RebaseTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("RebaseTransaction.TTid", op, msgpack.Bin8) p.TTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("RebaseTransaction.TTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("RebaseTransaction.TTid", op, msgpack.Bin8)
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("RebaseTransaction.LockingTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("RebaseTransaction.TTid", l, 8)
}
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("RebaseTransaction.LockingTid", l, 8) p.LockingTid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("RebaseTransaction.LockingTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("RebaseTransaction.LockingTid", l, 8)
}
p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.LockingTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -4668,14 +4844,19 @@ func (p *AnswerRebaseTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4668,14 +4844,19 @@ func (p *AnswerRebaseTransaction) neoMsgDecodeM(data []byte) (int, error) {
p.OidList = make([]zodb.Oid, l) p.OidList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OidList[i] a := &p.OidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerRebaseTransaction", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerRebaseTransaction", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerRebaseTransaction", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerRebaseTransaction", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 1 + int(nread), nil return 1 + int(nread), nil
...@@ -4762,20 +4943,32 @@ func (p *RebaseObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4762,20 +4943,32 @@ func (p *RebaseObject) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("RebaseObject.TTid", op, msgpack.Bin8) p.TTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("RebaseObject.TTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("RebaseObject.TTid", op, msgpack.Bin8)
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("RebaseObject.Oid", op, msgpack.Bin8) return 0, mdecodeLen8Err("RebaseObject.TTid", l, 8)
}
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("RebaseObject.Oid", l, 8) p.Oid = zodb.Oid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("RebaseObject.Oid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("RebaseObject.Oid", l, 8)
}
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -4895,21 +5088,33 @@ func (p *AnswerRebaseObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4895,21 +5088,33 @@ func (p *AnswerRebaseObject) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerRebaseObject.Serial", op, msgpack.Bin8) p.Serial = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerRebaseObject.Serial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerRebaseObject.Serial", op, msgpack.Bin8)
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerRebaseObject.ConflictSerial", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerRebaseObject.Serial", l, 8)
}
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerRebaseObject.ConflictSerial", l, 8) p.ConflictSerial = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerRebaseObject.ConflictSerial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerRebaseObject.ConflictSerial", l, 8)
}
p.ConflictSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.ConflictSerial = zodb.Tid(binary.BigEndian.Uint64(data[12:])) switch op := msgpack.Op(data[0]); op {
switch op := msgpack.Op(data[20]); op {
default: default:
return 0, mdecodeOpErr("AnswerRebaseObject.Compression", op, msgpack.True, msgpack.False) return 0, mdecodeOpErr("AnswerRebaseObject.Compression", op, msgpack.True, msgpack.False)
case msgpack.True: case msgpack.True:
...@@ -4919,14 +5124,14 @@ func (p *AnswerRebaseObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -4919,14 +5124,14 @@ func (p *AnswerRebaseObject) neoMsgDecodeM(data []byte) (int, error) {
case msgpack.Nil: case msgpack.Nil:
p.Compression = false p.Compression = false
} }
if op := msgpack.Op(data[21]); op != msgpack.Bin8 { if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerRebaseObject.Checksum", op, msgpack.Bin8) return 0, mdecodeOpErr("AnswerRebaseObject.Checksum", op, msgpack.Bin8)
} }
if l := data[22]; l != 20 { if l := data[2]; l != 20 {
return 0, mdecodeLen8Err("AnswerRebaseObject.Checksum", l, 20) return 0, mdecodeLen8Err("AnswerRebaseObject.Checksum", l, 20)
} }
copy(p.Checksum[:], data[23:43]) copy(p.Checksum[:], data[3:23])
data = data[43:] data = data[23:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -5088,21 +5293,33 @@ func (p *StoreObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5088,21 +5293,33 @@ func (p *StoreObject) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("StoreObject.Oid", op, msgpack.Bin8) p.Oid = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("StoreObject.Oid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("StoreObject.Oid", op, msgpack.Bin8)
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("StoreObject.Serial", op, msgpack.Bin8) return 0, mdecodeLen8Err("StoreObject.Oid", l, 8)
}
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("StoreObject.Serial", l, 8) p.Serial = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("StoreObject.Serial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("StoreObject.Serial", l, 8)
}
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[12:])) switch op := msgpack.Op(data[0]); op {
switch op := msgpack.Op(data[20]); op {
default: default:
return 0, mdecodeOpErr("StoreObject.Compression", op, msgpack.True, msgpack.False) return 0, mdecodeOpErr("StoreObject.Compression", op, msgpack.True, msgpack.False)
case msgpack.True: case msgpack.True:
...@@ -5112,14 +5329,14 @@ func (p *StoreObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5112,14 +5329,14 @@ func (p *StoreObject) neoMsgDecodeM(data []byte) (int, error) {
case msgpack.Nil: case msgpack.Nil:
p.Compression = false p.Compression = false
} }
if op := msgpack.Op(data[21]); op != msgpack.Bin8 { if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("StoreObject.Checksum", op, msgpack.Bin8) return 0, mdecodeOpErr("StoreObject.Checksum", op, msgpack.Bin8)
} }
if l := data[22]; l != 20 { if l := data[2]; l != 20 {
return 0, mdecodeLen8Err("StoreObject.Checksum", l, 20) return 0, mdecodeLen8Err("StoreObject.Checksum", l, 20)
} }
copy(p.Checksum[:], data[23:43]) copy(p.Checksum[:], data[3:23])
data = data[43:] data = data[23:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -5133,20 +5350,32 @@ func (p *StoreObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5133,20 +5350,32 @@ func (p *StoreObject) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 20 { if len(data) < 20 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("StoreObject.DataSerial", op, msgpack.Bin8) p.DataSerial = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("StoreObject.DataSerial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("StoreObject.DataSerial", op, msgpack.Bin8)
p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("StoreObject.Tid", op, msgpack.Bin8) return 0, mdecodeLen8Err("StoreObject.DataSerial", l, 8)
}
p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("StoreObject.Tid", l, 8) p.Tid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("StoreObject.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("StoreObject.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 64 + int(nread), nil return 64 + int(nread), nil
overflow: overflow:
...@@ -5215,13 +5444,19 @@ func (p *AnswerStoreObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5215,13 +5444,19 @@ func (p *AnswerStoreObject) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerStoreObject.Conflict", op, msgpack.Bin8) p.Conflict = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerStoreObject.Conflict", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerStoreObject.Conflict", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerStoreObject.Conflict", l, 8)
}
p.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -5332,15 +5567,20 @@ func (p *AbortTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5332,15 +5567,20 @@ func (p *AbortTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AbortTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AbortTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AbortTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AbortTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AbortTransaction.NodeList", err) return 0, mdecodeErr("AbortTransaction.NodeList", err)
...@@ -5544,14 +5784,19 @@ func (p *StoreTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5544,14 +5784,19 @@ func (p *StoreTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("StoreTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("StoreTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("StoreTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("StoreTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -5593,14 +5838,19 @@ func (p *StoreTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5593,14 +5838,19 @@ func (p *StoreTransaction) neoMsgDecodeM(data []byte) (int, error) {
p.OidList = make([]zodb.Oid, l) p.OidList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OidList[i] a := &p.OidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("StoreTransaction", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("StoreTransaction", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("StoreTransaction", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("StoreTransaction", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 11 + int(nread), nil return 11 + int(nread), nil
...@@ -5716,13 +5966,19 @@ func (p *VoteTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5716,13 +5966,19 @@ func (p *VoteTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("VoteTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("VoteTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("VoteTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("VoteTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -5868,27 +6124,45 @@ func (p *GetObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -5868,27 +6124,45 @@ func (p *GetObject) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("GetObject.Oid", op, msgpack.Bin8) p.Oid = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("GetObject.Oid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("GetObject.Oid", op, msgpack.Bin8)
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("GetObject.At", op, msgpack.Bin8) return 0, mdecodeLen8Err("GetObject.Oid", l, 8)
} }
if l := data[11]; l != 8 { p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
return 0, mdecodeLen8Err("GetObject.At", l, 8) data = data[10:]
} }
p.At = zodb.Tid(binary.BigEndian.Uint64(data[12:])) if data[0] == byte(msgpack.Nil) {
if op := msgpack.Op(data[20]); op != msgpack.Bin8 { p.At = zodb.Tid(18446744073709551615)
return 0, mdecodeOpErr("GetObject.Before", op, msgpack.Bin8) data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("GetObject.At", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("GetObject.At", l, 8)
}
p.At = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[21]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("GetObject.Before", l, 8) p.Before = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("GetObject.Before", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("GetObject.Before", l, 8)
}
p.Before = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Before = zodb.Tid(binary.BigEndian.Uint64(data[22:]))
return 31, nil return 31, nil
overflow: overflow:
...@@ -6040,28 +6314,46 @@ func (p *AnswerObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6040,28 +6314,46 @@ func (p *AnswerObject) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerObject.Oid", op, msgpack.Bin8) p.Oid = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerObject.Oid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerObject.Oid", op, msgpack.Bin8)
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerObject.Serial", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerObject.Oid", l, 8)
} }
if l := data[11]; l != 8 { p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
return 0, mdecodeLen8Err("AnswerObject.Serial", l, 8) data = data[10:]
} }
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[12:])) if data[0] == byte(msgpack.Nil) {
if op := msgpack.Op(data[20]); op != msgpack.Bin8 { p.Serial = zodb.Tid(18446744073709551615)
return 0, mdecodeOpErr("AnswerObject.NextSerial", op, msgpack.Bin8) data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObject.Serial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerObject.Serial", l, 8)
}
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[21]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerObject.NextSerial", l, 8) p.NextSerial = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObject.NextSerial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerObject.NextSerial", l, 8)
}
p.NextSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.NextSerial = zodb.Tid(binary.BigEndian.Uint64(data[22:])) switch op := msgpack.Op(data[0]); op {
switch op := msgpack.Op(data[30]); op {
default: default:
return 0, mdecodeOpErr("AnswerObject.Compression", op, msgpack.True, msgpack.False) return 0, mdecodeOpErr("AnswerObject.Compression", op, msgpack.True, msgpack.False)
case msgpack.True: case msgpack.True:
...@@ -6071,14 +6363,14 @@ func (p *AnswerObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6071,14 +6363,14 @@ func (p *AnswerObject) neoMsgDecodeM(data []byte) (int, error) {
case msgpack.Nil: case msgpack.Nil:
p.Compression = false p.Compression = false
} }
if op := msgpack.Op(data[31]); op != msgpack.Bin8 { if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObject.Checksum", op, msgpack.Bin8) return 0, mdecodeOpErr("AnswerObject.Checksum", op, msgpack.Bin8)
} }
if l := data[32]; l != 20 { if l := data[2]; l != 20 {
return 0, mdecodeLen8Err("AnswerObject.Checksum", l, 20) return 0, mdecodeLen8Err("AnswerObject.Checksum", l, 20)
} }
copy(p.Checksum[:], data[33:53]) copy(p.Checksum[:], data[3:23])
data = data[53:] data = data[23:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -6092,13 +6384,19 @@ func (p *AnswerObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6092,13 +6384,19 @@ func (p *AnswerObject) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 10 { if len(data) < 10 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerObject.DataSerial", op, msgpack.Bin8) p.DataSerial = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerObject.DataSerial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObject.DataSerial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerObject.DataSerial", l, 8)
}
p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 64 + int(nread), nil return 64 + int(nread), nil
overflow: overflow:
...@@ -6304,14 +6602,19 @@ func (p *AnswerTIDs) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6304,14 +6602,19 @@ func (p *AnswerTIDs) neoMsgDecodeM(data []byte) (int, error) {
p.TIDList = make([]zodb.Tid, l) p.TIDList = make([]zodb.Tid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.TIDList[i] a := &p.TIDList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerTIDs", op, msgpack.Bin8) (*a) = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerTIDs", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerTIDs", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerTIDs", l, 8)
}
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 1 + int(nread), nil return 1 + int(nread), nil
...@@ -6382,13 +6685,19 @@ func (p *TransactionInformation) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6382,13 +6685,19 @@ func (p *TransactionInformation) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("TransactionInformation.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("TransactionInformation.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("TransactionInformation.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("TransactionInformation.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -6575,14 +6884,19 @@ func (p *AnswerTransactionInformation) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6575,14 +6884,19 @@ func (p *AnswerTransactionInformation) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerTransactionInformation.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerTransactionInformation.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerTransactionInformation.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerTransactionInformation.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -6638,14 +6952,19 @@ func (p *AnswerTransactionInformation) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6638,14 +6952,19 @@ func (p *AnswerTransactionInformation) neoMsgDecodeM(data []byte) (int, error) {
p.OidList = make([]zodb.Oid, l) p.OidList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OidList[i] a := &p.OidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerTransactionInformation", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerTransactionInformation", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerTransactionInformation", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerTransactionInformation", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 12 + int(nread), nil return 12 + int(nread), nil
...@@ -6729,14 +7048,19 @@ func (p *ObjectHistory) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6729,14 +7048,19 @@ func (p *ObjectHistory) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("ObjectHistory.Oid", op, msgpack.Bin8) p.Oid = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("ObjectHistory.Oid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("ObjectHistory.Oid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("ObjectHistory.Oid", l, 8)
}
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
{ {
v, tail, err := msgp.ReadUint64Bytes(data) v, tail, err := msgp.ReadUint64Bytes(data)
if err != nil { if err != nil {
...@@ -6885,15 +7209,20 @@ func (p *AnswerObjectHistory) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6885,15 +7209,20 @@ func (p *AnswerObjectHistory) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerObjectHistory.Oid", op, msgpack.Bin8) p.Oid = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerObjectHistory.Oid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObjectHistory.Oid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerObjectHistory.Oid", l, 8)
}
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerObjectHistory.HistoryList", err) return 0, mdecodeErr("AnswerObjectHistory.HistoryList", err)
...@@ -6919,14 +7248,19 @@ func (p *AnswerObjectHistory) neoMsgDecodeM(data []byte) (int, error) { ...@@ -6919,14 +7248,19 @@ func (p *AnswerObjectHistory) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerObjectHistory.Serial", op, msgpack.Bin8) (*a).Serial = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerObjectHistory.Serial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObjectHistory.Serial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerObjectHistory.Serial", l, 8)
}
(*a).Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a).Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
{ {
v, tail, err := msgp.ReadUint32Bytes(data) v, tail, err := msgp.ReadUint32Bytes(data)
if err != nil { if err != nil {
...@@ -8866,29 +9200,46 @@ func (p *ObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) { ...@@ -8866,29 +9200,46 @@ func (p *ObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("ObjectUndoSerial.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("ObjectUndoSerial.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("ObjectUndoSerial.Tid", op, msgpack.Bin8)
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("ObjectUndoSerial.LTID", op, msgpack.Bin8) return 0, mdecodeLen8Err("ObjectUndoSerial.Tid", l, 8)
} }
if l := data[11]; l != 8 { p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 0, mdecodeLen8Err("ObjectUndoSerial.LTID", l, 8) data = data[10:]
} }
p.LTID = zodb.Tid(binary.BigEndian.Uint64(data[12:])) if data[0] == byte(msgpack.Nil) {
if op := msgpack.Op(data[20]); op != msgpack.Bin8 { p.LTID = zodb.Tid(18446744073709551615)
return 0, mdecodeOpErr("ObjectUndoSerial.UndoneTID", op, msgpack.Bin8) data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("ObjectUndoSerial.LTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("ObjectUndoSerial.LTID", l, 8)
}
p.LTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[21]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("ObjectUndoSerial.UndoneTID", l, 8) p.UndoneTID = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("ObjectUndoSerial.UndoneTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("ObjectUndoSerial.UndoneTID", l, 8)
}
p.UndoneTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.UndoneTID = zodb.Tid(binary.BigEndian.Uint64(data[22:]))
{ {
data = data[30:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("ObjectUndoSerial.OidList", err) return 0, mdecodeErr("ObjectUndoSerial.OidList", err)
...@@ -8902,14 +9253,19 @@ func (p *ObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) { ...@@ -8902,14 +9253,19 @@ func (p *ObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
p.OidList = make([]zodb.Oid, l) p.OidList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OidList[i] a := &p.OidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("ObjectUndoSerial", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("ObjectUndoSerial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("ObjectUndoSerial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("ObjectUndoSerial", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 31 + int(nread), nil return 31 + int(nread), nil
...@@ -9071,22 +9427,27 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9071,22 +9427,27 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
m := p.ObjectTIDDict m := p.ObjectTIDDict
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
var key zodb.Oid var key zodb.Oid
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerObjectUndoSerial", op, msgpack.Bin8) key = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerObjectUndoSerial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObjectUndoSerial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerObjectUndoSerial", l, 8)
}
key = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
key = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
var mv struct { var mv struct {
CurrentSerial zodb.Tid CurrentSerial zodb.Tid
UndoSerial zodb.Tid UndoSerial zodb.Tid
IsCurrent bool IsCurrent bool
} }
if op, opOk := msgpack.Op(data[10]), msgpack.FixArray_4|3; op != opOk { if op, opOk := msgpack.Op(data[0]), msgpack.FixArray_4|3; op != opOk {
return 0, &mstructDecodeError{"AnswerObjectUndoSerial", op, opOk} return 0, &mstructDecodeError{"AnswerObjectUndoSerial", op, opOk}
} }
data = data[10:]
{ {
_, tail, err := msgp.ReadArrayHeaderBytes(data) _, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
...@@ -9094,21 +9455,33 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9094,21 +9455,33 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerObjectUndoSerial.CurrentSerial", op, msgpack.Bin8) mv.CurrentSerial = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerObjectUndoSerial.CurrentSerial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerObjectUndoSerial.CurrentSerial", op, msgpack.Bin8)
mv.CurrentSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerObjectUndoSerial.UndoSerial", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerObjectUndoSerial.CurrentSerial", l, 8)
}
mv.CurrentSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerObjectUndoSerial.UndoSerial", l, 8) mv.UndoSerial = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerObjectUndoSerial.UndoSerial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerObjectUndoSerial.UndoSerial", l, 8)
}
mv.UndoSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
mv.UndoSerial = zodb.Tid(binary.BigEndian.Uint64(data[12:])) switch op := msgpack.Op(data[0]); op {
switch op := msgpack.Op(data[20]); op {
default: default:
return 0, mdecodeOpErr("AnswerObjectUndoSerial.IsCurrent", op, msgpack.True, msgpack.False) return 0, mdecodeOpErr("AnswerObjectUndoSerial.IsCurrent", op, msgpack.True, msgpack.False)
case msgpack.True: case msgpack.True:
...@@ -9119,7 +9492,7 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9119,7 +9492,7 @@ func (p *AnswerObjectUndoSerial) neoMsgDecodeM(data []byte) (int, error) {
mv.IsCurrent = false mv.IsCurrent = false
} }
m[key] = mv m[key] = mv
data = data[21:] data = data[1:]
} }
} }
return 1 + int(nread), nil return 1 + int(nread), nil
...@@ -9219,21 +9592,32 @@ func (p *AskTIDsFrom) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9219,21 +9592,32 @@ func (p *AskTIDsFrom) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AskTIDsFrom.MinTID", op, msgpack.Bin8) p.MinTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AskTIDsFrom.MinTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AskTIDsFrom.MinTID", op, msgpack.Bin8)
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AskTIDsFrom.MaxTID", op, msgpack.Bin8) return 0, mdecodeLen8Err("AskTIDsFrom.MinTID", l, 8)
}
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AskTIDsFrom.MaxTID", l, 8) p.MaxTID = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AskTIDsFrom.MaxTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AskTIDsFrom.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
data = data[20:]
{ {
v, tail, err := msgp.ReadUint32Bytes(data) v, tail, err := msgp.ReadUint32Bytes(data)
if err != nil { if err != nil {
...@@ -9360,14 +9744,19 @@ func (p *AnswerTIDsFrom) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9360,14 +9744,19 @@ func (p *AnswerTIDsFrom) neoMsgDecodeM(data []byte) (int, error) {
p.TidList = make([]zodb.Tid, l) p.TidList = make([]zodb.Tid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.TidList[i] a := &p.TidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerTIDsFrom", op, msgpack.Bin8) (*a) = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerTIDsFrom", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerTIDsFrom", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerTIDsFrom", l, 8)
}
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 1 + int(nread), nil return 1 + int(nread), nil
...@@ -9438,13 +9827,19 @@ func (p *Pack) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9438,13 +9827,19 @@ func (p *Pack) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("Pack.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("Pack.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("Pack.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("Pack.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -9683,20 +10078,32 @@ func (p *CheckReplicas) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9683,20 +10078,32 @@ func (p *CheckReplicas) neoMsgDecodeM(data []byte) (int, error) {
goto overflow goto overflow
} }
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("CheckReplicas.MinTID", op, msgpack.Bin8) p.MinTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("CheckReplicas.MinTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("CheckReplicas.MinTID", op, msgpack.Bin8)
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("CheckReplicas.MaxTID", op, msgpack.Bin8) return 0, mdecodeLen8Err("CheckReplicas.MinTID", l, 8)
}
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("CheckReplicas.MaxTID", l, 8) p.MaxTID = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("CheckReplicas.MaxTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("CheckReplicas.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21 + int(nread), nil return 21 + int(nread), nil
overflow: overflow:
...@@ -9906,20 +10313,32 @@ func (p *CheckPartition) neoMsgDecodeM(data []byte) (int, error) { ...@@ -9906,20 +10313,32 @@ func (p *CheckPartition) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 20 { if len(data) < 20 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("CheckPartition.MinTID", op, msgpack.Bin8) p.MinTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("CheckPartition.MinTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("CheckPartition.MinTID", op, msgpack.Bin8)
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("CheckPartition.MaxTID", op, msgpack.Bin8) return 0, mdecodeLen8Err("CheckPartition.MinTID", l, 8)
}
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("CheckPartition.MaxTID", l, 8) p.MaxTID = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("CheckPartition.MaxTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("CheckPartition.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 23 + int(nread), nil return 23 + int(nread), nil
overflow: overflow:
...@@ -10038,20 +10457,32 @@ func (p *CheckTIDRange) neoMsgDecodeM(data []byte) (int, error) { ...@@ -10038,20 +10457,32 @@ func (p *CheckTIDRange) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 20 { if len(data) < 20 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("CheckTIDRange.MinTID", op, msgpack.Bin8) p.MinTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("CheckTIDRange.MinTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("CheckTIDRange.MinTID", op, msgpack.Bin8)
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("CheckTIDRange.MaxTID", op, msgpack.Bin8) return 0, mdecodeLen8Err("CheckTIDRange.MinTID", l, 8)
}
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("CheckTIDRange.MaxTID", l, 8) p.MaxTID = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("CheckTIDRange.MaxTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("CheckTIDRange.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21 + int(nread), nil return 21 + int(nread), nil
overflow: overflow:
...@@ -10151,13 +10582,19 @@ func (p *AnswerCheckTIDRange) neoMsgDecodeM(data []byte) (int, error) { ...@@ -10151,13 +10582,19 @@ func (p *AnswerCheckTIDRange) neoMsgDecodeM(data []byte) (int, error) {
return 0, mdecodeLen8Err("AnswerCheckTIDRange.Checksum", l, 20) return 0, mdecodeLen8Err("AnswerCheckTIDRange.Checksum", l, 20)
} }
copy(p.Checksum[:], data[2:22]) copy(p.Checksum[:], data[2:22])
if op := msgpack.Op(data[22]); op != msgpack.Bin8 { if data[22] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerCheckTIDRange.MaxTID", op, msgpack.Bin8) p.MaxTID = zodb.Tid(18446744073709551615)
} data = data[23:]
if l := data[23]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerCheckTIDRange.MaxTID", l, 8) if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerCheckTIDRange.MaxTID", op, msgpack.Bin8)
}
if l := data[23]; l != 8 {
return 0, mdecodeLen8Err("AnswerCheckTIDRange.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24:]))
data = data[32:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24:]))
return 33 + int(nread), nil return 33 + int(nread), nil
overflow: overflow:
...@@ -10292,27 +10729,45 @@ func (p *CheckSerialRange) neoMsgDecodeM(data []byte) (int, error) { ...@@ -10292,27 +10729,45 @@ func (p *CheckSerialRange) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 30 { if len(data) < 30 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("CheckSerialRange.MinTID", op, msgpack.Bin8) p.MinTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("CheckSerialRange.MinTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("CheckSerialRange.MinTID", op, msgpack.Bin8)
p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("CheckSerialRange.MaxTID", op, msgpack.Bin8) return 0, mdecodeLen8Err("CheckSerialRange.MinTID", l, 8)
} }
if l := data[11]; l != 8 { p.MinTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 0, mdecodeLen8Err("CheckSerialRange.MaxTID", l, 8) data = data[10:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:])) if data[0] == byte(msgpack.Nil) {
if op := msgpack.Op(data[20]); op != msgpack.Bin8 { p.MaxTID = zodb.Tid(18446744073709551615)
return 0, mdecodeOpErr("CheckSerialRange.MinOID", op, msgpack.Bin8) data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("CheckSerialRange.MaxTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("CheckSerialRange.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[21]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("CheckSerialRange.MinOID", l, 8) p.MinOID = zodb.Oid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("CheckSerialRange.MinOID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("CheckSerialRange.MinOID", l, 8)
}
p.MinOID = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MinOID = zodb.Oid(binary.BigEndian.Uint64(data[22:]))
return 31 + int(nread), nil return 31 + int(nread), nil
overflow: overflow:
...@@ -10433,27 +10888,39 @@ func (p *AnswerCheckSerialRange) neoMsgDecodeM(data []byte) (int, error) { ...@@ -10433,27 +10888,39 @@ func (p *AnswerCheckSerialRange) neoMsgDecodeM(data []byte) (int, error) {
return 0, mdecodeLen8Err("AnswerCheckSerialRange.TidChecksum", l, 20) return 0, mdecodeLen8Err("AnswerCheckSerialRange.TidChecksum", l, 20)
} }
copy(p.TidChecksum[:], data[2:22]) copy(p.TidChecksum[:], data[2:22])
if op := msgpack.Op(data[22]); op != msgpack.Bin8 { if data[22] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerCheckSerialRange.MaxTID", op, msgpack.Bin8) p.MaxTID = zodb.Tid(18446744073709551615)
} data = data[23:]
if l := data[23]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerCheckSerialRange.MaxTID", l, 8) if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerCheckSerialRange.MaxTID", op, msgpack.Bin8)
}
if l := data[23]; l != 8 {
return 0, mdecodeLen8Err("AnswerCheckSerialRange.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24:]))
data = data[32:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[24:])) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
if op := msgpack.Op(data[32]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerCheckSerialRange.OidChecksum", op, msgpack.Bin8) return 0, mdecodeOpErr("AnswerCheckSerialRange.OidChecksum", op, msgpack.Bin8)
} }
if l := data[33]; l != 20 { if l := data[1]; l != 20 {
return 0, mdecodeLen8Err("AnswerCheckSerialRange.OidChecksum", l, 20) return 0, mdecodeLen8Err("AnswerCheckSerialRange.OidChecksum", l, 20)
} }
copy(p.OidChecksum[:], data[34:54]) copy(p.OidChecksum[:], data[2:22])
if op := msgpack.Op(data[54]); op != msgpack.Bin8 { if data[22] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerCheckSerialRange.MaxOID", op, msgpack.Bin8) p.MaxOID = zodb.Oid(18446744073709551615)
} data = data[23:]
if l := data[55]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerCheckSerialRange.MaxOID", l, 8) if op := msgpack.Op(data[22]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerCheckSerialRange.MaxOID", op, msgpack.Bin8)
}
if l := data[23]; l != 8 {
return 0, mdecodeLen8Err("AnswerCheckSerialRange.MaxOID", l, 8)
}
p.MaxOID = zodb.Oid(binary.BigEndian.Uint64(data[24:]))
data = data[32:]
} }
p.MaxOID = zodb.Oid(binary.BigEndian.Uint64(data[56:]))
return 65 + int(nread), nil return 65 + int(nread), nil
overflow: overflow:
...@@ -10742,13 +11209,19 @@ func (p *AnswerLastTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -10742,13 +11209,19 @@ func (p *AnswerLastTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerLastTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerLastTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerLastTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerLastTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
...@@ -10849,27 +11322,45 @@ func (p *CheckCurrentSerial) neoMsgDecodeM(data []byte) (int, error) { ...@@ -10849,27 +11322,45 @@ func (p *CheckCurrentSerial) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("CheckCurrentSerial.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("CheckCurrentSerial.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("CheckCurrentSerial.Tid", op, msgpack.Bin8)
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("CheckCurrentSerial.Oid", op, msgpack.Bin8) return 0, mdecodeLen8Err("CheckCurrentSerial.Tid", l, 8)
} }
if l := data[11]; l != 8 { p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 0, mdecodeLen8Err("CheckCurrentSerial.Oid", l, 8) data = data[10:]
} }
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[12:])) if data[0] == byte(msgpack.Nil) {
if op := msgpack.Op(data[20]); op != msgpack.Bin8 { p.Oid = zodb.Oid(18446744073709551615)
return 0, mdecodeOpErr("CheckCurrentSerial.Serial", op, msgpack.Bin8) data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("CheckCurrentSerial.Oid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("CheckCurrentSerial.Oid", l, 8)
}
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[21]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("CheckCurrentSerial.Serial", l, 8) p.Serial = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("CheckCurrentSerial.Serial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("CheckCurrentSerial.Serial", l, 8)
}
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[22:]))
return 31, nil return 31, nil
overflow: overflow:
...@@ -10949,13 +11440,19 @@ func (p *AnswerCheckCurrentSerial) neoMsgDecodeM(data []byte) (int, error) { ...@@ -10949,13 +11440,19 @@ func (p *AnswerCheckCurrentSerial) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerCheckCurrentSerial.AnswerStoreObject.Conflict", op, msgpack.Bin8) p.AnswerStoreObject.Conflict = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerCheckCurrentSerial.AnswerStoreObject.Conflict", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerCheckCurrentSerial.AnswerStoreObject.Conflict", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerCheckCurrentSerial.AnswerStoreObject.Conflict", l, 8)
}
p.AnswerStoreObject.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.AnswerStoreObject.Conflict = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 12, nil return 12, nil
overflow: overflow:
...@@ -11040,20 +11537,32 @@ func (p *NotifyTransactionFinished) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11040,20 +11537,32 @@ func (p *NotifyTransactionFinished) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("NotifyTransactionFinished.TTID", op, msgpack.Bin8) p.TTID = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("NotifyTransactionFinished.TTID", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("NotifyTransactionFinished.TTID", op, msgpack.Bin8)
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("NotifyTransactionFinished.MaxTID", op, msgpack.Bin8) return 0, mdecodeLen8Err("NotifyTransactionFinished.TTID", l, 8)
}
p.TTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("NotifyTransactionFinished.MaxTID", l, 8) p.MaxTID = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("NotifyTransactionFinished.MaxTID", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("NotifyTransactionFinished.MaxTID", l, 8)
}
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MaxTID = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
return 21, nil return 21, nil
overflow: overflow:
...@@ -11222,14 +11731,19 @@ func (p *Replicate) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11222,14 +11731,19 @@ func (p *Replicate) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("Replicate.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("Replicate.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("Replicate.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("Replicate.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -11357,13 +11871,19 @@ func (p *ReplicationDone) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11357,13 +11871,19 @@ func (p *ReplicationDone) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 10 { if len(data) < 10 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("ReplicationDone.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("ReplicationDone.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("ReplicationDone.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("ReplicationDone.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11 + int(nread), nil return 11 + int(nread), nil
overflow: overflow:
...@@ -11524,22 +12044,33 @@ func (p *FetchTransactions) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11524,22 +12044,33 @@ func (p *FetchTransactions) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 20 { if len(data) < 20 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FetchTransactions.MinTid", op, msgpack.Bin8) p.MinTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FetchTransactions.MinTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("FetchTransactions.MinTid", op, msgpack.Bin8)
p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("FetchTransactions.MaxTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("FetchTransactions.MinTid", l, 8)
}
p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("FetchTransactions.MaxTid", l, 8) p.MaxTid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FetchTransactions.MaxTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FetchTransactions.MaxTid", l, 8)
}
p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
{ {
data = data[20:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("FetchTransactions.TxnKnownList", err) return 0, mdecodeErr("FetchTransactions.TxnKnownList", err)
...@@ -11553,14 +12084,19 @@ func (p *FetchTransactions) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11553,14 +12084,19 @@ func (p *FetchTransactions) neoMsgDecodeM(data []byte) (int, error) {
p.TxnKnownList = make([]zodb.Tid, l) p.TxnKnownList = make([]zodb.Tid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.TxnKnownList[i] a := &p.TxnKnownList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FetchTransactions", op, msgpack.Bin8) (*a) = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FetchTransactions", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FetchTransactions", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FetchTransactions", l, 8)
}
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 21 + int(nread), nil return 21 + int(nread), nil
...@@ -11690,22 +12226,33 @@ func (p *AnswerFetchTransactions) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11690,22 +12226,33 @@ func (p *AnswerFetchTransactions) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerFetchTransactions.PackTid", op, msgpack.Bin8) p.PackTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerFetchTransactions.PackTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerFetchTransactions.PackTid", op, msgpack.Bin8)
p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerFetchTransactions.NextTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerFetchTransactions.PackTid", l, 8)
}
p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerFetchTransactions.NextTid", l, 8) p.NextTid = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerFetchTransactions.NextTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerFetchTransactions.NextTid", l, 8)
}
p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[12:]))
{ {
data = data[20:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerFetchTransactions.TxnDeleteList", err) return 0, mdecodeErr("AnswerFetchTransactions.TxnDeleteList", err)
...@@ -11719,14 +12266,19 @@ func (p *AnswerFetchTransactions) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11719,14 +12266,19 @@ func (p *AnswerFetchTransactions) neoMsgDecodeM(data []byte) (int, error) {
p.TxnDeleteList = make([]zodb.Tid, l) p.TxnDeleteList = make([]zodb.Tid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.TxnDeleteList[i] a := &p.TxnDeleteList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerFetchTransactions", op, msgpack.Bin8) (*a) = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerFetchTransactions", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerFetchTransactions", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerFetchTransactions", l, 8)
}
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 21 + int(nread), nil return 21 + int(nread), nil
...@@ -11967,29 +12519,46 @@ func (p *FetchObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -11967,29 +12519,46 @@ func (p *FetchObjects) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 30 { if len(data) < 30 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FetchObjects.MinTid", op, msgpack.Bin8) p.MinTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FetchObjects.MinTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("FetchObjects.MinTid", op, msgpack.Bin8)
p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("FetchObjects.MaxTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("FetchObjects.MinTid", l, 8)
} }
if l := data[11]; l != 8 { p.MinTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 0, mdecodeLen8Err("FetchObjects.MaxTid", l, 8) data = data[10:]
} }
p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[12:])) if data[0] == byte(msgpack.Nil) {
if op := msgpack.Op(data[20]); op != msgpack.Bin8 { p.MaxTid = zodb.Tid(18446744073709551615)
return 0, mdecodeOpErr("FetchObjects.MinOid", op, msgpack.Bin8) data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FetchObjects.MaxTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FetchObjects.MaxTid", l, 8)
}
p.MaxTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[21]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("FetchObjects.MinOid", l, 8) p.MinOid = zodb.Oid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FetchObjects.MinOid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FetchObjects.MinOid", l, 8)
}
p.MinOid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.MinOid = zodb.Oid(binary.BigEndian.Uint64(data[22:]))
{ {
data = data[30:]
l, tail, err := msgp.ReadMapHeaderBytes(data) l, tail, err := msgp.ReadMapHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("FetchObjects.ObjKnownDict", err) return 0, mdecodeErr("FetchObjects.ObjKnownDict", err)
...@@ -12003,16 +12572,21 @@ func (p *FetchObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12003,16 +12572,21 @@ func (p *FetchObjects) neoMsgDecodeM(data []byte) (int, error) {
goto overflow goto overflow
} }
var key zodb.Tid var key zodb.Tid
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FetchObjects", op, msgpack.Bin8) key = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FetchObjects", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FetchObjects", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FetchObjects", l, 8)
}
key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
var mv []zodb.Oid var mv []zodb.Oid
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("FetchObjects", err) return 0, mdecodeErr("FetchObjects", err)
...@@ -12026,14 +12600,19 @@ func (p *FetchObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12026,14 +12600,19 @@ func (p *FetchObjects) neoMsgDecodeM(data []byte) (int, error) {
mv = make([]zodb.Oid, l) mv = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &mv[i] a := &mv[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("FetchObjects", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("FetchObjects", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("FetchObjects", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("FetchObjects", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
m[key] = mv m[key] = mv
...@@ -12245,29 +12824,46 @@ func (p *AnswerFetchObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12245,29 +12824,46 @@ func (p *AnswerFetchObjects) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerFetchObjects.PackTid", op, msgpack.Bin8) p.PackTid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerFetchObjects.PackTid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AnswerFetchObjects.PackTid", op, msgpack.Bin8)
p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AnswerFetchObjects.NextTid", op, msgpack.Bin8) return 0, mdecodeLen8Err("AnswerFetchObjects.PackTid", l, 8)
} }
if l := data[11]; l != 8 { p.PackTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 0, mdecodeLen8Err("AnswerFetchObjects.NextTid", l, 8) data = data[10:]
} }
p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[12:])) if data[0] == byte(msgpack.Nil) {
if op := msgpack.Op(data[20]); op != msgpack.Bin8 { p.NextTid = zodb.Tid(18446744073709551615)
return 0, mdecodeOpErr("AnswerFetchObjects.NextOid", op, msgpack.Bin8) data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerFetchObjects.NextTid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerFetchObjects.NextTid", l, 8)
}
p.NextTid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[21]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AnswerFetchObjects.NextOid", l, 8) p.NextOid = zodb.Oid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerFetchObjects.NextOid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerFetchObjects.NextOid", l, 8)
}
p.NextOid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.NextOid = zodb.Oid(binary.BigEndian.Uint64(data[22:]))
{ {
data = data[30:]
l, tail, err := msgp.ReadMapHeaderBytes(data) l, tail, err := msgp.ReadMapHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerFetchObjects.ObjDeleteDict", err) return 0, mdecodeErr("AnswerFetchObjects.ObjDeleteDict", err)
...@@ -12281,16 +12877,21 @@ func (p *AnswerFetchObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12281,16 +12877,21 @@ func (p *AnswerFetchObjects) neoMsgDecodeM(data []byte) (int, error) {
goto overflow goto overflow
} }
var key zodb.Tid var key zodb.Tid
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerFetchObjects", op, msgpack.Bin8) key = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerFetchObjects", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerFetchObjects", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerFetchObjects", l, 8)
}
key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
key = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
var mv []zodb.Oid var mv []zodb.Oid
{ {
data = data[10:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AnswerFetchObjects", err) return 0, mdecodeErr("AnswerFetchObjects", err)
...@@ -12304,14 +12905,19 @@ func (p *AnswerFetchObjects) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12304,14 +12905,19 @@ func (p *AnswerFetchObjects) neoMsgDecodeM(data []byte) (int, error) {
mv = make([]zodb.Oid, l) mv = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &mv[i] a := &mv[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AnswerFetchObjects", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AnswerFetchObjects", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AnswerFetchObjects", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AnswerFetchObjects", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
m[key] = mv m[key] = mv
...@@ -12520,14 +13126,19 @@ func (p *AddTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12520,14 +13126,19 @@ func (p *AddTransaction) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AddTransaction.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AddTransaction.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AddTransaction.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AddTransaction.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -12568,15 +13179,20 @@ func (p *AddTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12568,15 +13179,20 @@ func (p *AddTransaction) neoMsgDecodeM(data []byte) (int, error) {
case msgpack.Nil: case msgpack.Nil:
p.Packed = false p.Packed = false
} }
if op := msgpack.Op(data[1]); op != msgpack.Bin8 { if data[1] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AddTransaction.TTid", op, msgpack.Bin8) p.TTid = zodb.Tid(18446744073709551615)
} data = data[2:]
if l := data[2]; l != 8 { } else {
return 0, mdecodeLen8Err("AddTransaction.TTid", l, 8) if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AddTransaction.TTid", op, msgpack.Bin8)
}
if l := data[2]; l != 8 {
return 0, mdecodeLen8Err("AddTransaction.TTid", l, 8)
}
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
data = data[11:]
} }
p.TTid = zodb.Tid(binary.BigEndian.Uint64(data[3:]))
{ {
data = data[11:]
l, tail, err := msgp.ReadArrayHeaderBytes(data) l, tail, err := msgp.ReadArrayHeaderBytes(data)
if err != nil { if err != nil {
return 0, mdecodeErr("AddTransaction.OidList", err) return 0, mdecodeErr("AddTransaction.OidList", err)
...@@ -12590,14 +13206,19 @@ func (p *AddTransaction) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12590,14 +13206,19 @@ func (p *AddTransaction) neoMsgDecodeM(data []byte) (int, error) {
p.OidList = make([]zodb.Oid, l) p.OidList = make([]zodb.Oid, l)
for i := 0; uint32(i) < l; i++ { for i := 0; uint32(i) < l; i++ {
a := &p.OidList[i] a := &p.OidList[i]
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AddTransaction", op, msgpack.Bin8) (*a) = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AddTransaction", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AddTransaction", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AddTransaction", l, 8)
}
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
(*a) = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
} }
return 22 + int(nread), nil return 22 + int(nread), nil
...@@ -12735,21 +13356,33 @@ func (p *AddObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12735,21 +13356,33 @@ func (p *AddObject) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AddObject.Oid", op, msgpack.Bin8) p.Oid = zodb.Oid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AddObject.Oid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
} return 0, mdecodeOpErr("AddObject.Oid", op, msgpack.Bin8)
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:])) }
if op := msgpack.Op(data[10]); op != msgpack.Bin8 { if l := data[1]; l != 8 {
return 0, mdecodeOpErr("AddObject.Serial", op, msgpack.Bin8) return 0, mdecodeLen8Err("AddObject.Oid", l, 8)
}
p.Oid = zodb.Oid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
if l := data[11]; l != 8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeLen8Err("AddObject.Serial", l, 8) p.Serial = zodb.Tid(18446744073709551615)
data = data[1:]
} else {
if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AddObject.Serial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AddObject.Serial", l, 8)
}
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Serial = zodb.Tid(binary.BigEndian.Uint64(data[12:])) switch op := msgpack.Op(data[0]); op {
switch op := msgpack.Op(data[20]); op {
default: default:
return 0, mdecodeOpErr("AddObject.Compression", op, msgpack.True, msgpack.False) return 0, mdecodeOpErr("AddObject.Compression", op, msgpack.True, msgpack.False)
case msgpack.True: case msgpack.True:
...@@ -12759,14 +13392,14 @@ func (p *AddObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12759,14 +13392,14 @@ func (p *AddObject) neoMsgDecodeM(data []byte) (int, error) {
case msgpack.Nil: case msgpack.Nil:
p.Compression = false p.Compression = false
} }
if op := msgpack.Op(data[21]); op != msgpack.Bin8 { if op := msgpack.Op(data[1]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AddObject.Checksum", op, msgpack.Bin8) return 0, mdecodeOpErr("AddObject.Checksum", op, msgpack.Bin8)
} }
if l := data[22]; l != 20 { if l := data[2]; l != 20 {
return 0, mdecodeLen8Err("AddObject.Checksum", l, 20) return 0, mdecodeLen8Err("AddObject.Checksum", l, 20)
} }
copy(p.Checksum[:], data[23:43]) copy(p.Checksum[:], data[3:23])
data = data[43:] data = data[23:]
{ {
b, tail, err := msgp.ReadBytesZC(data) b, tail, err := msgp.ReadBytesZC(data)
if err != nil { if err != nil {
...@@ -12780,13 +13413,19 @@ func (p *AddObject) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12780,13 +13413,19 @@ func (p *AddObject) neoMsgDecodeM(data []byte) (int, error) {
if len(data) < 10 { if len(data) < 10 {
goto overflow goto overflow
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("AddObject.DataSerial", op, msgpack.Bin8) p.DataSerial = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("AddObject.DataSerial", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("AddObject.DataSerial", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("AddObject.DataSerial", l, 8)
}
p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.DataSerial = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 54 + int(nread), nil return 54 + int(nread), nil
overflow: overflow:
...@@ -12855,13 +13494,19 @@ func (p *Truncate) neoMsgDecodeM(data []byte) (int, error) { ...@@ -12855,13 +13494,19 @@ func (p *Truncate) neoMsgDecodeM(data []byte) (int, error) {
} }
data = tail data = tail
} }
if op := msgpack.Op(data[0]); op != msgpack.Bin8 { if data[0] == byte(msgpack.Nil) {
return 0, mdecodeOpErr("Truncate.Tid", op, msgpack.Bin8) p.Tid = zodb.Tid(18446744073709551615)
} data = data[1:]
if l := data[1]; l != 8 { } else {
return 0, mdecodeLen8Err("Truncate.Tid", l, 8) if op := msgpack.Op(data[0]); op != msgpack.Bin8 {
return 0, mdecodeOpErr("Truncate.Tid", op, msgpack.Bin8)
}
if l := data[1]; l != 8 {
return 0, mdecodeLen8Err("Truncate.Tid", l, 8)
}
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
data = data[10:]
} }
p.Tid = zodb.Tid(binary.BigEndian.Uint64(data[2:]))
return 11, nil return 11, nil
overflow: overflow:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment