cherry pick b22a7c2
from https://gitee.com/hw_llm/kernel_liteos_a/pulls/1212
Description: console read 漏洞修复 IssueNo: https://gitee.com/openharmony/kernel_liteos_a/issues/IALLNX?from=project-issue Feature Or Bugfix: Feature Binary Source: No Signed-off-by: hw_llm <liu.limin@huawei.com>
This commit is contained in:
parent
16a54f36bb
commit
0c53eca089
|
@ -687,7 +687,7 @@ STATIC ssize_t ConsoleRead(struct file *filep, CHAR *buffer, size_t bufLen)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userBuf) {
|
if (userBuf) {
|
||||||
if (LOS_ArchCopyToUser(buffer, sbuffer, bufLen) != 0) {
|
if (LOS_ArchCopyToUser(buffer, sbuffer, ret) != 0) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto ERROUT;
|
goto ERROUT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue