diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-03-04 22:34:31 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-04 22:34:31 +0000 |
commit | 3dfe3b3f778d21120eccfaada6fb0bf54cef14e5 (patch) | |
tree | f8939840a081e4be0c7dd1ecdddd0ba27f7bdb3e /pkg/safemem | |
parent | a2ecd14575307e26cfbebf0ddc36533b0b8938de (diff) | |
parent | a690b5762480ae80ef4264402fcfa8d84b57339a (diff) |
Merge release-20200219.0-100-ga690b57 (automated)
Diffstat (limited to 'pkg/safemem')
-rwxr-xr-x | pkg/safemem/seq_unsafe.go | 3 |
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, |