aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishnankutty Kolathappilly <kkolat@codeaurora.org>2013-11-06 10:08:39 -0800
committerMister Oyster <oysterized@gmail.com>2017-06-25 16:48:08 +0200
commit16c9df31c659e32d2a0f11cfa3347547a033f757 (patch)
tree9bd9b07ee6b2fcd098a6f431e4c3d228c827b2ab
parent9811ad71117e8dd4260517fc82f410fea0b992e2 (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 df35cbfee..49a44d761 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -620,9 +620,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,