From: Luis Henriques <luis.henriques@canonical.com>
To: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Cc: Vinod Koul <vinod.koul@intel.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: ALSA: compress: Memset timestamp structure to zero.
Date: Tue, 23 Aug 2016 14:40:37 +0100 [thread overview]
Message-ID: <1471959637-18163-2-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1471959637-18163-1-git-send-email-luis.henriques@canonical.com>
From: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
snd_compr_tstamp is initialized using aggregate initialization
that does not zero out the padded bytes. Initialize timestamp
structure to zero using memset to avoid this.
CRs-Fixed: 568717
Change-Id: I7a7d188705161f06201f1a1f2945bb6acd633d5d
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
---
sound/core/compress_offload.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 2c498488af6c..84aaa07ca853 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -659,9 +659,10 @@ snd_compr_set_metadata(struct snd_compr_stream *stream, unsigned long arg)
static inline int
snd_compr_tstamp(struct snd_compr_stream *stream, unsigned long arg)
{
- struct snd_compr_tstamp tstamp = {0};
+ struct snd_compr_tstamp tstamp;
int ret;
+ memset(&tstamp, 0, sizeof(tstamp));
ret = snd_compr_update_tstamp(stream, &tstamp);
if (ret == 0)
ret = copy_to_user((struct snd_compr_tstamp __user *)arg,
next prev parent reply other threads:[~2016-08-23 13:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 13:40 CVE-2014-9892 fix is not upstream Luis Henriques
2016-08-23 13:40 ` Luis Henriques [this message]
2016-08-23 13:45 ` ALSA: compress: Memset timestamp structure to zero Takashi Iwai
2016-08-23 16:01 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471959637-18163-2-git-send-email-luis.henriques@canonical.com \
--to=luis.henriques@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=kkolat@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®