Merge "msm: adsprpc: Allocate buffer taking NULL byte into consideration"

This commit is contained in:
qctecmdr 2021-04-26 08:46:47 -07:00 • committed by Gerrit - the friendly Code Review server
commit 8e25b91508

View file

@ -3818,7 +3818,7 @@ static int fastrpc_init_create_static_process(struct fastrpc_file *fl,
if (!init->filelen)
goto bail;
proc_name = kzalloc(init->filelen, GFP_KERNEL);
proc_name = kzalloc(init->filelen + 1, GFP_KERNEL);
VERIFY(err, !IS_ERR_OR_NULL(proc_name));
if (err) {
err = -ENOMEM;