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

Commit 016f1444 authored by Anirudh Raghavendra's avatar Anirudh Raghavendra
Browse files

msm:adsprpc: Fixed NULL dereference in getargs()



Fixed possible NULL dereference issue in getargs()

Change-Id: Ia413e2c680bf890e8c4119981b94875146ce4b4e
Signed-off-by: default avatarAnirudh Raghavendra <araghave@codeaurora.org>
parent 732a1ae2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2292,10 +2292,12 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
		}
	}
	PERF_END);
	for (i = bufs; rpra && i < bufs + handles; i++) {

	for (i = bufs; ctx->fds && rpra && i < bufs + handles; i++) {
		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;
		rpra[i].dma.offset =
				(uint32_t)(uintptr_t)lpra[i].buf.pv;
	}

	/* Copy rpra to local buffer */