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

Commit 3526312c authored by Srinivasarao Pathipati's avatar Srinivasarao Pathipati
Browse files

soc: qcom: minidump: check the size parameter passed to qcom_smem_get()



The size parameter passed to qcom_smem_get() can become less than
global toc size, add check to avoid out of bound accessing.

Change-Id: I068b4d5e27e94ce23c26856dad106a3970fb56d6
Signed-off-by: default avatarSrinivasarao Pathipati <quic_c_spathi@quicinc.com>
parent 33431eba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -542,7 +542,7 @@ static int __init msm_minidump_init(void)
	}

	/*Check global minidump support initialization */
	if (!md_global_toc->md_toc_init) {
	if (size < sizeof(*md_global_toc) || !md_global_toc->md_toc_init) {
		pr_err("System Minidump TOC not initialized\n");
		return -ENODEV;
	}