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

Commit 32b01cc9 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ADSPRPC: Map and FD non-NULL check before dereferencing"

parents e35dbb21 d09f7c79
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1833,10 +1833,11 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
	PERF_END);
	for (i = bufs; i < bufs + handles; ++i) {
		struct fastrpc_mmap *map = ctx->maps[i];

		if (map) {
			pages[i].addr = map->phys;
			pages[i].size = map->size;
		}
	}
	fdlist = (uint64_t *)&pages[bufs + handles];
	crclist = (uint32_t *)&fdlist[M_FDLIST];
	/* reset fds, crc and early wakeup hint memory */