Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03cc0789 authored by Al Viro's avatar Al Viro
Browse files

do_splice_to(): cap the size before passing to ->splice_read()



pipe capacity won't exceed 2G anyway.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7500c38a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1143,6 +1143,9 @@ static long do_splice_to(struct file *in, loff_t *ppos,
	if (unlikely(ret < 0))
		return ret;

	if (unlikely(len > MAX_RW_COUNT))
		len = MAX_RW_COUNT;

	if (in->f_op->splice_read)
		splice_read = in->f_op->splice_read;
	else