summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-09 06:07:20 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-09 06:07:20 +0000
commit530e65aa917ad4094be03aa67e114e15d5bb28b1 (patch)
treee78c9bc1bdfaa28c13cb66657ad5ee84fd2b10eb /pkg/sentry
parent91c3f439680a37d2b4baabee9967b29a25aeb08d (diff)
parenta10389e783aab5f530641394ef44c8a1dede9372 (diff)
Merge release-20200323.0-100-ga10389e (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/syscalls/linux/sys_splice.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_splice.go b/pkg/sentry/syscalls/linux/sys_splice.go
index fd642834b..fbc6cf15f 100644
--- a/pkg/sentry/syscalls/linux/sys_splice.go
+++ b/pkg/sentry/syscalls/linux/sys_splice.go
@@ -29,6 +29,10 @@ func doSplice(t *kernel.Task, outFile, inFile *fs.File, opts fs.SpliceOpts, nonB
return 0, syserror.EINVAL
}
+ if opts.Length > int64(kernel.MAX_RW_COUNT) {
+ opts.Length = int64(kernel.MAX_RW_COUNT)
+ }
+
var (
total int64
n int64