vendor runc v1.0.0-rc91

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2020-07-01 19:13:24 +09:00
parent 1bc5ba3f48
commit fb208d015a
155 changed files with 8803 additions and 5699 deletions

View File

@@ -22,5 +22,9 @@ func NewStringPointer(str string) Pointer {
return Pointer{}
}
return Pointer{ptr: unsafe.Pointer(&[]byte(str)[0])}
// The kernel expects strings to be zero terminated
buf := make([]byte, len(str)+1)
copy(buf, str)
return Pointer{ptr: unsafe.Pointer(&buf[0])}
}