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

Commit 1eec07c3 authored by Jeya R's avatar Jeya R
Browse files

msm: ADSPRPC: Add check to avoid out of bound scenario



Add cid check before making PW awake request
to avoid out of bound scenario due to improper
array index.

Change-Id: I91335e17dbc1cb03467d50cc2367cadc9b3bd9c8
Acked-by: default avatarEkansh Gupta <ekangupt@qti.qualcomm.com>
Signed-off-by: default avatarJeya R <jeyr@codeaurora.org>
parent 585c4163
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4234,6 +4234,9 @@ static int fastrpc_internal_control(struct fastrpc_file *fl,
			fl->ws_timeout = MAX_PM_TIMEOUT_MS;
		else
			fl->ws_timeout = cp->pm.timeout;
		VERIFY(err, fl->cid >= 0 && fl->cid < NUM_CHANNELS);
		if (err)
			goto bail;
		fastrpc_pm_awake(fl, gcinfo[fl->cid].secure);
		break;
	case FASTRPC_CONTROL_DSPPROCESS_CLEAN: