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

This commit is contained in:
qctecmdr 2023-07-24 21:48:16 -07:00 committed by Gerrit - the friendly Code Review server
commit bc353eb572

View File

@ -561,7 +561,7 @@ static int __init msm_minidump_init(void)
} }
/*Check global minidump support initialization */ /*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"); pr_err("System Minidump TOC not initialized\n");
return -ENODEV; return -ENODEV;
} }