Message ID | 1452826728-19286-1-git-send-email-tiffany.lin@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c index 327e83a..6c01920 100644 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c @@ -516,6 +516,9 @@ static int put_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user put_user(kp->reserved, &up->reserved)) return -EFAULT; + if (put_user(kp->length, &up->length)) + return -EFAULT; + if (V4L2_TYPE_IS_MULTIPLANAR(kp->type)) { num_planes = kp->length; if (num_planes == 0)
In v4l2-compliance utility, test QUERYBUF required correct length value to go through each planar to check planar's length in multi-planar buffer type Change-Id: I98faddc5711c24f17beda52e6d18c657add251ac Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 +++ 1 file changed, 3 insertions(+)