Prev: [patch 085/123] thinkpad-acpi: fix bluetooth/wwan resume
Next: [patch 121/123] sched: Fix SMT scheduler regression in find_busiest_queue()
From: Greg KH on 12 Mar 2010 19:30 2.6.33-stable review patch. If anyone has any objections, please let me know. ----------------- From: Baruch Siach <baruch(a)tkos.co.il> commit 84f3751d6a6f766780dee509433bf7b3dfcdf465 upstream. When code <= V4L2_MBUS_FMT_FIXED soc_mbus_get_fmtdesc returns a pointer to mbus_fmt[x], where x < 0. Fix this. Signed-off-by: Baruch Siach <baruch(a)tkos.co.il> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski(a)gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab(a)redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/media/video/soc_mediabus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/media/video/soc_mediabus.c +++ b/drivers/media/video/soc_mediabus.c @@ -134,7 +134,8 @@ EXPORT_SYMBOL(soc_mbus_bytes_per_line); const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc( enum v4l2_mbus_pixelcode code) { - if ((unsigned int)(code - V4L2_MBUS_FMT_FIXED) > ARRAY_SIZE(mbus_fmt)) + if (code - V4L2_MBUS_FMT_FIXED > ARRAY_SIZE(mbus_fmt) || + code <= V4L2_MBUS_FMT_FIXED) return NULL; return mbus_fmt + code - V4L2_MBUS_FMT_FIXED - 1; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |