All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
@ 2013-08-23  9:33 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-23  9:33 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Sylwester Nawrocki, Sachin Kamat, Laurent Pinchart, linux-media,
	kernel-janitors

The check is off by one so we could read one space past the end of the
array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
index 789c02a..629a5cd 100644
--- a/drivers/media/i2c/s5k6aa.c
+++ b/drivers/media/i2c/s5k6aa.c
@@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct v4l2_subdev *sd,
 	const struct s5k6aa_interval *fi;
 	int ret = 0;
 
-	if (fie->index > ARRAY_SIZE(s5k6aa_intervals))
+	if (fie->index >= ARRAY_SIZE(s5k6aa_intervals))
 		return -EINVAL;
 
 	v4l_bound_align_image(&fie->width, S5K6AA_WIN_WIDTH_MIN,

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
@ 2013-08-23  9:33 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-23  9:33 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Sylwester Nawrocki, Sachin Kamat, Laurent Pinchart, linux-media,
	kernel-janitors

The check is off by one so we could read one space past the end of the
array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
index 789c02a..629a5cd 100644
--- a/drivers/media/i2c/s5k6aa.c
+++ b/drivers/media/i2c/s5k6aa.c
@@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct v4l2_subdev *sd,
 	const struct s5k6aa_interval *fi;
 	int ret = 0;
 
-	if (fie->index > ARRAY_SIZE(s5k6aa_intervals))
+	if (fie->index >= ARRAY_SIZE(s5k6aa_intervals))
 		return -EINVAL;
 
 	v4l_bound_align_image(&fie->width, S5K6AA_WIN_WIDTH_MIN,

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
  2013-08-23  9:33 ` Dan Carpenter
@ 2013-08-23 12:54   ` Laurent Pinchart
  -1 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-08-23 12:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Mauro Carvalho Chehab, Sylwester Nawrocki, Sachin Kamat,
	linux-media, kernel-janitors

Hi Dan,

Thank you for the patch.

On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
> The check is off by one so we could read one space past the end of the
> array.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Mauro, I have no other pending sensor patches, can you pick this one up from 
the list, or should I send you a pull request ?

> diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
> index 789c02a..629a5cd 100644
> --- a/drivers/media/i2c/s5k6aa.c
> +++ b/drivers/media/i2c/s5k6aa.c
> @@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct
> v4l2_subdev *sd, const struct s5k6aa_interval *fi;
>  	int ret = 0;
> 
> -	if (fie->index > ARRAY_SIZE(s5k6aa_intervals))
> +	if (fie->index >= ARRAY_SIZE(s5k6aa_intervals))
>  		return -EINVAL;
> 
>  	v4l_bound_align_image(&fie->width, S5K6AA_WIN_WIDTH_MIN,

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
@ 2013-08-23 12:54   ` Laurent Pinchart
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-08-23 12:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Mauro Carvalho Chehab, Sylwester Nawrocki, Sachin Kamat,
	linux-media, kernel-janitors

Hi Dan,

Thank you for the patch.

On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
> The check is off by one so we could read one space past the end of the
> array.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Mauro, I have no other pending sensor patches, can you pick this one up from 
the list, or should I send you a pull request ?

> diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
> index 789c02a..629a5cd 100644
> --- a/drivers/media/i2c/s5k6aa.c
> +++ b/drivers/media/i2c/s5k6aa.c
> @@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct
> v4l2_subdev *sd, const struct s5k6aa_interval *fi;
>  	int ret = 0;
> 
> -	if (fie->index > ARRAY_SIZE(s5k6aa_intervals))
> +	if (fie->index >= ARRAY_SIZE(s5k6aa_intervals))
>  		return -EINVAL;
> 
>  	v4l_bound_align_image(&fie->width, S5K6AA_WIN_WIDTH_MIN,

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
  2013-08-23 12:54   ` Laurent Pinchart
@ 2013-08-23 13:11     ` Sylwester Nawrocki
  -1 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2013-08-23 13:11 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Dan Carpenter, Mauro Carvalho Chehab, Sachin Kamat, linux-media,
	kernel-janitors

Hi Laurent,

On 08/23/2013 02:54 PM, Laurent Pinchart wrote:
> Hi Dan,
> 
> Thank you for the patch.
> 
> On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
>> The check is off by one so we could read one space past the end of the
>> array.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> Mauro, I have no other pending sensor patches, can you pick this one up from 
> the list, or should I send you a pull request ?

I can handle all pending patches for the Samsung sensors, I was planning
to send a pull request today. I can pick up the ov9650 patch as well.
I'd like to also include the s5k5bafx sensor patch in one of my pull
requests.

IIRC it was agreed that we as Samsung will handle our stuff ourselves
and be sending it to Mauro directly.

--
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
@ 2013-08-23 13:11     ` Sylwester Nawrocki
  0 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2013-08-23 13:11 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Dan Carpenter, Mauro Carvalho Chehab, Sachin Kamat, linux-media,
	kernel-janitors

Hi Laurent,

On 08/23/2013 02:54 PM, Laurent Pinchart wrote:
> Hi Dan,
> 
> Thank you for the patch.
> 
> On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
>> The check is off by one so we could read one space past the end of the
>> array.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> Mauro, I have no other pending sensor patches, can you pick this one up from 
> the list, or should I send you a pull request ?

I can handle all pending patches for the Samsung sensors, I was planning
to send a pull request today. I can pick up the ov9650 patch as well.
I'd like to also include the s5k5bafx sensor patch in one of my pull
requests.

IIRC it was agreed that we as Samsung will handle our stuff ourselves
and be sending it to Mauro directly.

--
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
  2013-08-23 13:11     ` Sylwester Nawrocki
@ 2013-08-23 13:16       ` Laurent Pinchart
  -1 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-08-23 13:16 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Dan Carpenter, Mauro Carvalho Chehab, Sachin Kamat, linux-media,
	kernel-janitors

Hi Sylwester,

On Friday 23 August 2013 15:11:49 Sylwester Nawrocki wrote:
> On 08/23/2013 02:54 PM, Laurent Pinchart wrote:
> > On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
> >> The check is off by one so we could read one space past the end of the
> >> array.
> >> 
> >> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > 
> > Mauro, I have no other pending sensor patches, can you pick this one up
> > from the list, or should I send you a pull request ?
> 
> I can handle all pending patches for the Samsung sensors, I was planning
> to send a pull request today. I can pick up the ov9650 patch as well.
> I'd like to also include the s5k5bafx sensor patch in one of my pull
> requests.
> 
> IIRC it was agreed that we as Samsung will handle our stuff ourselves
> and be sending it to Mauro directly.

That's less work for me, so I will definitely not complain :-)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
@ 2013-08-23 13:16       ` Laurent Pinchart
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-08-23 13:16 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Dan Carpenter, Mauro Carvalho Chehab, Sachin Kamat, linux-media,
	kernel-janitors

Hi Sylwester,

On Friday 23 August 2013 15:11:49 Sylwester Nawrocki wrote:
> On 08/23/2013 02:54 PM, Laurent Pinchart wrote:
> > On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
> >> The check is off by one so we could read one space past the end of the
> >> array.
> >> 
> >> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > 
> > Mauro, I have no other pending sensor patches, can you pick this one up
> > from the list, or should I send you a pull request ?
> 
> I can handle all pending patches for the Samsung sensors, I was planning
> to send a pull request today. I can pick up the ov9650 patch as well.
> I'd like to also include the s5k5bafx sensor patch in one of my pull
> requests.
> 
> IIRC it was agreed that we as Samsung will handle our stuff ourselves
> and be sending it to Mauro directly.

That's less work for me, so I will definitely not complain :-)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-08-23 13:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23  9:33 [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval() Dan Carpenter
2013-08-23  9:33 ` Dan Carpenter
2013-08-23 12:54 ` Laurent Pinchart
2013-08-23 12:54   ` Laurent Pinchart
2013-08-23 13:11   ` Sylwester Nawrocki
2013-08-23 13:11     ` Sylwester Nawrocki
2013-08-23 13:16     ` Laurent Pinchart
2013-08-23 13:16       ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.