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

Commit 5095ed92 authored by Mohammed Nayeem Ur Rahman's avatar Mohammed Nayeem Ur Rahman Committed by Gerrit - the friendly Code Review server
Browse files

adsprpc: Validate fds pointer before de-referencing it



Validate fds pointer before de-referencing it.

Change-Id: I31c84e99a228da0b2bde322714acd2a6e29026c6
Acked-by: default avatarMaitreyi Gupta <maitreyi@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Nayeem Ur Rahman <mohara@codeaurora.org>
parent 4945d76d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1928,6 +1928,7 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
	}
	PERF_END);
	for (i = bufs; rpra && i < bufs + handles; i++) {
		if (ctx->fds)
			rpra[i].dma.fd = ctx->fds[i];
		rpra[i].dma.len = (uint32_t)lpra[i].buf.len;
		rpra[i].dma.offset = (uint32_t)(uintptr_t)lpra[i].buf.pv;