Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4dee954a authored by Krishnankutty Kolathappilly's avatar Krishnankutty Kolathappilly Committed by Banajit Goswami
Browse files

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: default avatarKrishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent 2f37c574
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -655,9 +655,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,