mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
Merge "soc: qcom: dcc: avoid memory access violation"
This commit is contained in:
commit
732a1ae2a0
1 changed files with 2 additions and 1 deletions
|
|
@ -1538,7 +1538,8 @@ static ssize_t dcc_sram_read(struct file *file, char __user *data,
|
|||
if (drvdata->ram_size <= *ppos)
|
||||
return 0;
|
||||
|
||||
if ((*ppos + len) > drvdata->ram_size)
|
||||
if ((*ppos + len) < len
|
||||
|| (*ppos + len) > drvdata->ram_size)
|
||||
len = (drvdata->ram_size - *ppos);
|
||||
|
||||
buf = kzalloc(len, GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue