summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishnankutty Kolathappilly <kkolat@codeaurora.org>2013-11-06 10:08:39 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:10:46 -0700
commit280e00c01dbaa3af5abaaf56d14dc889d84c1822 (patch)
tree2f2d94b38c3e59fd06fbb3c09848a14620dc2b46
parentfea50d9677667c1d886c255c29ebeb433184e003 (diff)
ALSA: compress: Memset timestamp structure to zero.
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>
-rw-r--r--sound/core/compress_offload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index b123c42e7dc8..4fee9d87f26a 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -621,9 +621,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,