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

Commit fe68ccc3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: audio: initialize the structure before sending to user space"

parents da79e9b9 1226a53f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -913,6 +913,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

	if (cmd == AUDIO_GET_STATS) {
		struct msm_audio_stats stats;
		memset(&stats, 0, sizeof(struct msm_audio_stats));
		stats.byte_count = audpp_avsync_byte_count(audio->dec_id);
		stats.sample_count = audpp_avsync_sample_count(audio->dec_id);
		if (copy_to_user((void *)arg, &stats, sizeof(stats)))
+1 −0
Original line number Diff line number Diff line
@@ -1189,6 +1189,7 @@ long audio_aio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
	case AUDIO_GET_STATS: {
		struct msm_audio_stats stats;
		uint64_t timestamp;
		memset(&stats, 0, sizeof(struct msm_audio_stats));
		stats.byte_count = atomic_read(&audio->in_bytes);
		stats.sample_count = atomic_read(&audio->in_samples);
		rc = q6asm_get_session_time(audio->ac, &timestamp);