summaryrefslogtreecommitdiffhomepage
path: root/pkg/safemem/seq_unsafe.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-04 22:34:31 +0000
committergVisor bot <gvisor-bot@google.com>2020-03-04 22:34:31 +0000
commit3dfe3b3f778d21120eccfaada6fb0bf54cef14e5 (patch)
treef8939840a081e4be0c7dd1ecdddd0ba27f7bdb3e /pkg/safemem/seq_unsafe.go
parenta2ecd14575307e26cfbebf0ddc36533b0b8938de (diff)
parenta690b5762480ae80ef4264402fcfa8d84b57339a (diff)
Merge release-20200219.0-100-ga690b57 (automated)
Diffstat (limited to 'pkg/safemem/seq_unsafe.go')
-rwxr-xr-xpkg/safemem/seq_unsafe.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/safemem/seq_unsafe.go b/pkg/safemem/seq_unsafe.go
index dcdfc9600..f5f0574f8 100755
--- a/pkg/safemem/seq_unsafe.go
+++ b/pkg/safemem/seq_unsafe.go
@@ -56,6 +56,9 @@ type BlockSeq struct {
// BlockSeqOf returns a BlockSeq representing the single Block b.
func BlockSeqOf(b Block) BlockSeq {
+ if b.length == 0 {
+ return BlockSeq{}
+ }
bs := BlockSeq{
data: b.start,
length: -1,