[PATCH] lavc/v4l2_m2m_dec: Init reserved bytes to zero before ioctl call
From: Andriy Gelman <andriy.gelman@gmail.com> 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 <andriy.gelman@gmail.com> --- 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 d666edffe46..c5ee86b9935 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 */ -- 2.25.0
On Sun, 08. Mar 11:49, Andriy Gelman wrote:
From: Andriy Gelman <andriy.gelman@gmail.com>
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 <andriy.gelman@gmail.com> --- 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 d666edffe46..c5ee86b9935 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 */ -- 2.25.0
ping -- Andriy
On Thu, 12. Mar 22:40, Andriy Gelman wrote:
On Sun, 08. Mar 11:49, Andriy Gelman wrote:
From: Andriy Gelman <andriy.gelman@gmail.com>
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 <andriy.gelman@gmail.com> --- 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 d666edffe46..c5ee86b9935 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 */ -- 2.25.0
ping
ping -- Andriy
On Sun, Mar 08, 2020 at 11:49:47AM -0400, Andriy Gelman wrote:
From: Andriy Gelman <andriy.gelman@gmail.com>
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 <andriy.gelman@gmail.com> --- libavcodec/v4l2_m2m_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
probably ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Whats the most studid thing your enemy could do ? Blow himself up Whats the most studid thing you could do ? Give up your rights and freedom because your enemy blew himself up.
On Wed, 01. Apr 00:38, Michael Niedermayer wrote:
On Sun, Mar 08, 2020 at 11:49:47AM -0400, Andriy Gelman wrote:
From: Andriy Gelman <andriy.gelman@gmail.com>
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 <andriy.gelman@gmail.com> --- libavcodec/v4l2_m2m_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
probably ok
thx
Applied. Thanks, -- Andriy
participants (2)
-
Andriy Gelman -
Michael Niedermayer