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

Commit 624f0c18 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] dvb_ca_en50221: fix compilation breakage



As reported by Toralf:

the build failed with :
  CC [M]  drivers/media/dvb/dvb-core/dvb_ca_en50221.o
In file included from arch/x86/include/asm/uaccess.h:573:0,
                 from include/linux/poll.h:14,
                 from drivers/media/dvb/dvb-core/dvbdev.h:27,
                 from drivers/media/dvb/dvb-core/dvb_ca_en50221.h:27,
                 from drivers/media/dvb/dvb-core/dvb_ca_en50221.c:41:
In function "copy_from_user", inlined from "dvb_ca_en50221_io_write" at drivers/media/dvb/dvb-core/dvb_ca_en50221.c:1314:26: arch/x86/include/asm/uaccess_32.h:211:26: error: call to "copy_from_user_overflow" declared with attribute error: copy_from_user() buffer size is not provably correct

Reported-by: default avatarToralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2f78604a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1306,6 +1306,10 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file,
	/* fragment the packets & store in the buffer */
	while (fragpos < count) {
		fraglen = ca->slot_info[slot].link_buf_size - 2;
		if (fraglen < 0)
			break;
		if (fraglen > HOST_LINK_BUF_SIZE - 2)
			fraglen = HOST_LINK_BUF_SIZE - 2;
		if ((count - fragpos) < fraglen)
			fraglen = count - fragpos;