mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
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: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
This commit is contained in:
parent
7ca4537e6c
commit
30e8ee90cb
1 changed files with 1 additions and 1 deletions
|
|
@ -561,7 +561,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue