Fixed remaining build errors.
parent
eb177d5cf4
commit
ca4f55538f
|
@ -344,14 +344,13 @@ func Convert(
|
||||||
co = &to.commonOp
|
co = &to.commonOp
|
||||||
|
|
||||||
case fusekernel.OpWrite:
|
case fusekernel.OpWrite:
|
||||||
in := (*fusekernel.WriteIn)(m.Data())
|
in := (*fusekernel.WriteIn)(m.Consume(fusekernel.WriteInSize(protocol)))
|
||||||
size := fusekernel.WriteInSize(protocol)
|
if in == nil {
|
||||||
if m.Len() < size {
|
|
||||||
err = errors.New("Corrupt OpWrite")
|
err = errors.New("Corrupt OpWrite")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
buf := m.Bytes()[size:]
|
buf := m.ConsumeBytes(m.Len())
|
||||||
if len(buf) < int(in.Size) {
|
if len(buf) < int(in.Size) {
|
||||||
err = errors.New("Corrupt OpWrite")
|
err = errors.New("Corrupt OpWrite")
|
||||||
return
|
return
|
||||||
|
@ -367,8 +366,9 @@ func Convert(
|
||||||
co = &to.commonOp
|
co = &to.commonOp
|
||||||
|
|
||||||
case fusekernel.OpFsync:
|
case fusekernel.OpFsync:
|
||||||
in := (*fusekernel.FsyncIn)(m.Data())
|
type input fusekernel.FsyncIn
|
||||||
if m.Len() < unsafe.Sizeof(*in) {
|
in := (*input)(m.Consume(unsafe.Sizeof(input{})))
|
||||||
|
if in == nil {
|
||||||
err = errors.New("Corrupt OpFsync")
|
err = errors.New("Corrupt OpFsync")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -381,8 +381,9 @@ func Convert(
|
||||||
co = &to.commonOp
|
co = &to.commonOp
|
||||||
|
|
||||||
case fusekernel.OpFlush:
|
case fusekernel.OpFlush:
|
||||||
in := (*fusekernel.FlushIn)(m.Data())
|
type input fusekernel.FlushIn
|
||||||
if m.Len() < unsafe.Sizeof(*in) {
|
in := (*input)(m.Consume(unsafe.Sizeof(input{})))
|
||||||
|
if in == nil {
|
||||||
err = errors.New("Corrupt OpFlush")
|
err = errors.New("Corrupt OpFlush")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -407,8 +408,9 @@ func Convert(
|
||||||
co = &to.commonOp
|
co = &to.commonOp
|
||||||
|
|
||||||
case fusekernel.OpInterrupt:
|
case fusekernel.OpInterrupt:
|
||||||
in := (*fusekernel.InterruptIn)(m.Data())
|
type input fusekernel.InterruptIn
|
||||||
if m.Len() < unsafe.Sizeof(*in) {
|
in := (*input)(m.Consume(unsafe.Sizeof(input{})))
|
||||||
|
if in == nil {
|
||||||
err = errors.New("Corrupt OpInterrupt")
|
err = errors.New("Corrupt OpInterrupt")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue