Skip to content

Commit 7612cf9

Browse files
committed
[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 <[email protected]>
1 parent 409e9ef commit 7612cf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static struct channel_info *find_channel(struct c8sectpfei *fei, int tsin_num)
361361
{
362362
int i;
363363

364-
for (i = 0; i < C8SECTPFE_MAXCHANNEL; i++) {
364+
for (i = 0; i < C8SECTPFE_MAX_TSIN_CHAN; i++) {
365365
if (!fei->channel_data[i])
366366
continue;
367367

0 commit comments

Comments
 (0)