Re: [PATCH] [media] s3c-camif: fix out-of-bounds array access

2017-09-13 Thread Sylwester Nawrocki
On 09/13/2017 04:03 PM, Arnd Bergmann wrote: On Wed, Sep 13, 2017 at 11:25 AM, Sylwester Nawrocki wrote: On 09/12/2017 10:09 PM, Arnd Bergmann wrote: { const struct s3c_camif_variant *variant = camif->variant; const struct vp_pix_limits *pix_lim; - int i = ARRAY_SIZE(cami

Re: [PATCH] [media] s3c-camif: fix out-of-bounds array access

2017-09-13 Thread Arnd Bergmann
On Wed, Sep 13, 2017 at 11:25 AM, Sylwester Nawrocki wrote: > On 09/12/2017 10:09 PM, Arnd Bergmann wrote: >> { >> const struct s3c_camif_variant *variant = camif->variant; >> const struct vp_pix_limits *pix_lim; >> - int i = ARRAY_SIZE(camif_mbus_formats); >> >> /* FIXME:

Re: [PATCH] [media] s3c-camif: fix out-of-bounds array access

2017-09-13 Thread Sylwester Nawrocki
On 09/12/2017 10:09 PM, Arnd Bergmann wrote: > While experimenting with older compiler versions, I ran > into a warning that no longer shows up on gcc-4.8 or newer: > > drivers/media/platform/s3c-camif/camif-capture.c: In function > '__camif_subdev_try_format': > drivers/media/platform/s3c-camif/

[PATCH] [media] s3c-camif: fix out-of-bounds array access

2017-09-12 Thread Arnd Bergmann
While experimenting with older compiler versions, I ran into a warning that no longer shows up on gcc-4.8 or newer: drivers/media/platform/s3c-camif/camif-capture.c: In function '__camif_subdev_try_format': drivers/media/platform/s3c-camif/camif-capture.c:1265:25: error: array subscript is below