summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 22:13:54 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 22:16:55 +0300
commit7612cf97ec8533b361529fc864508d1caaf47a87 (patch)
tree6316f46dfd932e72fe717d762c785d1e6d7899ba /drivers/media
parent409e9eff727295b93a5dde51988a6f8646e5aa6b (diff)
downloadlinux-7612cf97ec8533b361529fc864508d1caaf47a87.tar.xz
[media] c8sectpfe: don't go past channel_data array
As reported by smatch: drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:365 find_channel() error: buffer overflow 'fei->channel_data' 8 <= 63 It seems that a cut-and-paste type of error occurred here: the channel_data array size is C8SECTPFE_MAX_TSIN_CHAN, and not C8SECTPFE_MAXCHANNEL. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 3a9109356e67..955d8daf055f 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -361,7 +361,7 @@ static struct channel_info *find_channel(struct c8sectpfei *fei, int tsin_num)
{
int i;
- for (i = 0; i < C8SECTPFE_MAXCHANNEL; i++) {
+ for (i = 0; i < C8SECTPFE_MAX_TSIN_CHAN; i++) {
if (!fei->channel_data[i])
continue;