diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-10 16:08:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-10 16:15:45 -0500 |
commit | 624f0c186978f9cb0ce6582f445922eaaa4a7f4a (patch) | |
tree | 5a666f64e0fca7079b471e7f2cde0407e9b15c42 /drivers/media | |
parent | 2f78604a433a12571ec3e54054fbfacc7525b307 (diff) |
[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: Toralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c index 7ea517b7e186..9be65a3b931f 100644 --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c | |||
@@ -1306,6 +1306,10 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file, | |||
1306 | /* fragment the packets & store in the buffer */ | 1306 | /* fragment the packets & store in the buffer */ |
1307 | while (fragpos < count) { | 1307 | while (fragpos < count) { |
1308 | fraglen = ca->slot_info[slot].link_buf_size - 2; | 1308 | fraglen = ca->slot_info[slot].link_buf_size - 2; |
1309 | if (fraglen < 0) | ||
1310 | break; | ||
1311 | if (fraglen > HOST_LINK_BUF_SIZE - 2) | ||
1312 | fraglen = HOST_LINK_BUF_SIZE - 2; | ||
1309 | if ((count - fragpos) < fraglen) | 1313 | if ((count - fragpos) < fraglen) |
1310 | fraglen = count - fragpos; | 1314 | fraglen = count - fragpos; |
1311 | 1315 | ||