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

Commit db95e66a authored by tharun kumar's avatar tharun kumar Committed by Gerrit - the friendly Code Review server
Browse files

SDM660: ADSPRPC: Handle NULL pointer dereference



Avoid using strlen as it results in NULL pointer
dereference for NULL value.

Change-Id: I21a9793b48caddb423f081cdcf2690ded1822e88
Acked-by: default avatarChenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent b7d425e9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1686,6 +1686,9 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
			int namelen;
			int pageslen;
		} inbuf;

		if (!init->filelen)
			goto bail;
		VERIFY(err, proc_name = kzalloc(init->filelen, GFP_KERNEL));
		if (err)
			goto bail;
@@ -1694,7 +1697,7 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
		if (err)
			goto bail;
		inbuf.pgid = current->tgid;
		inbuf.namelen = strlen(proc_name)+1;
		inbuf.namelen = init->filelen;
		inbuf.pageslen = 0;
		if (!me->staticpd_flags) {
			inbuf.pageslen = 1;