From b343eca8d5b9546f6d630736938825707f58e6c6 Mon Sep 17 00:00:00 2001 From: Andriy Gelman Date: Sun, 8 Mar 2020 11:49:47 -0400 Subject: avcodec/v4l2_m2m_dec: Init reserved bytes to zero before ioctl call struct v4l2_selection contains reserved bytes which should be set to zero before the ioctl call. Fixes valgrind error: Syscall param ioctl(VKI_V4L2_S_SELECTION) points to uninitialised byte(s) Signed-off-by: Andriy Gelman --- libavcodec/v4l2_m2m_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c index d666edffe4..c5ee86b993 100644 --- a/libavcodec/v4l2_m2m_dec.c +++ b/libavcodec/v4l2_m2m_dec.c @@ -39,7 +39,7 @@ static int v4l2_try_start(AVCodecContext *avctx) V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; V4L2Context *const capture = &s->capture; V4L2Context *const output = &s->output; - struct v4l2_selection selection; + struct v4l2_selection selection = { 0 }; int ret; /* 1. start the output process */ -- cgit v1.2.3