From: Philipp Zabel Date: Fri, 23 Jan 2015 16:51:22 +0000 (-0300) Subject: [media] coda: properly clear f_cap in coda_s_fmt_vid_out X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c2f6a9983a7b079c4bada2bb43c336bb7b8abb9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] coda: properly clear f_cap in coda_s_fmt_vid_out Properly zero the structure on the stack before using it. Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index ff7da3a5c4ae..d26794fa74bf 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -674,6 +674,7 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv, ctx->colorspace = f->fmt.pix.colorspace; + memset(&f_cap, 0, sizeof(f_cap)); f_cap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; coda_g_fmt(file, priv, &f_cap); f_cap.fmt.pix.width = f->fmt.pix.width;