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

Commit 066f4a30 authored by Anish Kumar's avatar Anish Kumar
Browse files

Asoc: msm: Null dereference check added



In asm_read function we should check buffer pointer
before it is dererferenced.

CRs-Fixed: 612682
Change-Id: I1968c038e1d35381bf174000287d542441e41092
Signed-off-by: default avatarAnish Kumar <kanish@codeaurora.org>
parent db9318e3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3711,6 +3711,11 @@ int q6asm_read(struct audio_client *ac)
		mutex_lock(&port->lock);

		dsp_buf = port->dsp_buf;
		if (port->buf == NULL) {
			pr_err("%s buf is NULL\n", __func__);
			mutex_unlock(&port->lock);
			return -EINVAL;
		}
		ab = &port->buf[dsp_buf];

		pr_debug("%s:session[%d]dsp-buf[%d][%p]cpu_buf[%d][%pa]\n",