Skip to content

Commit

Permalink
[media] c8sectpfe: don't go past channel_data array
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Aug 11, 2015
1 parent 409e9ef commit 7612cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7612cf9

Please sign in to comment.