!1212 console read 漏洞修复

Merge pull request !1212 from hw_llm/master
This commit is contained in:
openharmony_ci 2024-08-22 07:06:10 +00:00 committed by Gitee
commit 2e642e6d9a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -687,7 +687,7 @@ STATIC ssize_t ConsoleRead(struct file *filep, CHAR *buffer, size_t bufLen)
}
if (userBuf) {
if (LOS_ArchCopyToUser(buffer, sbuffer, bufLen) != 0) {
if (LOS_ArchCopyToUser(buffer, sbuffer, ret) != 0) {
ret = -EFAULT;
goto ERROUT;
}