mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 08:54:28 -05:00
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 591b1f455c32206704cbcf426bb30911c260c33e Mon Sep 17 00:00:00 2001
|
|
From: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
|
|
Date: Wed, 6 Nov 2013 10:08:39 -0800
|
|
Subject: 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>
|
|
---
|
|
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 99db892..0a69437 100644
|
|
--- a/sound/core/compress_offload.c
|
|
+++ b/sound/core/compress_offload.c
|
|
@@ -613,9 +613,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,
|
|
--
|
|
cgit v1.1
|
|
|