WSL2-Linux-Kernel/drivers/media/pci/ttpci
Arnd Bergmann 69d3973af1 [media] ttpci: address stringop overflow warning
gcc-7.0.1 warns about old code in ttpci:

In file included from drivers/media/pci/ttpci/av7110.c:63:0:
In function 'irdebi.isra.2',
    inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3,
    inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:659:3:
drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   memcpy(av7110->debi_virt, (char *) &res, count);
In function 'irdebi.isra.2',
    inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3,
    inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:668:3:
drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   memcpy(av7110->debi_virt, (char *) &res, count);

Apparently, 'count' can be negative here, which will then get turned
into a giant size argument for memcpy. Changing the sizes to 'unsigned
int' instead seems safe as we already check for maximum sizes, and it
also simplifies the code a bit.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-08 11:46:07 -02:00
..
Kconfig [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV 2014-08-21 15:25:38 -05:00
Makefile [media] dvb-core: move dvb_filter out of the DVB core 2016-10-21 08:44:08 -02:00
av7110.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
av7110.h [media] ttpci: cleanup debug macros and remove dead code 2016-11-18 09:40:43 -02:00
av7110_av.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
av7110_av.h [media] av7110: don't allow negative volumes 2015-11-17 14:36:39 -02:00
av7110_ca.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
av7110_ca.h
av7110_hw.c [media] ttpci: address stringop overflow warning 2017-02-08 11:46:07 -02:00
av7110_hw.h [media] ttpci: address stringop overflow warning 2017-02-08 11:46:07 -02:00
av7110_ipack.c
av7110_ipack.h
av7110_ir.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
av7110_v4l.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
budget-av.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
budget-ci.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
budget-core.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
budget-patch.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
budget.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
budget.h [media] ttpci: cleanup debug macros and remove dead code 2016-11-18 09:40:43 -02:00
dvb_filter.c [media] dvb_filter: use KERN_CONT where needed 2016-10-21 08:44:56 -02:00
dvb_filter.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ttpci-eeprom.c [media] ttpci: don't break long lines 2016-10-21 09:29:43 -02:00
ttpci-eeprom.h