[media] vb2: core: Skip planes array verification if pb is NULL
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 11 May 2016 21:44:32 +0000 (18:44 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 16 Jun 2016 10:34:25 +0000 (07:34 -0300)
commit126f40298446a82116e1f92a1aaf72b8c8228fae
tree028f16eefff513db30a42ffa315603fc17d9bb2b
parent6f0dd24a084a17f9984dd49dffbf7055bf123993
[media] vb2: core: Skip planes array verification if pb is NULL

An earlier patch fixing an input validation issue introduced another
issue: vb2_core_dqbuf() is called with pb argument value NULL in some
cases, causing a NULL pointer dereference. Fix this by skipping the
verification as there's nothing to verify.

Fixes: e7e0c3e26587 ("[media] videobuf2-core: Check user space planes array in dqbuf")
Signed-off-by: David R <david@unsolicited.net>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org # for v4.4 and later
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/videobuf2-core.c