Description: fix CVE-817641412102197248
IssueNo: https://gitee.com/openharmony/kernel_liteos_a/issues/IACJLK Feature Or Bugfix: Bugfix Binary Source: No Signed-off-by: hw_llm <liu.limin@huawei.com>
This commit is contained in:
parent
78db02de2c
commit
da45d3f539
|
@ -401,7 +401,7 @@ ssize_t SysSendMsg(int s, const struct msghdr *message, int flags)
|
||||||
CHECK_ASPACE(message, sizeof(struct msghdr));
|
CHECK_ASPACE(message, sizeof(struct msghdr));
|
||||||
CPY_FROM_CONST_USER(struct msghdr, message);
|
CPY_FROM_CONST_USER(struct msghdr, message);
|
||||||
|
|
||||||
if (message && message->msg_iovlen > IOV_MAX) {
|
if (message && (size_t)message->msg_iovlen > IOV_MAX) {
|
||||||
set_errno(EMSGSIZE);
|
set_errno(EMSGSIZE);
|
||||||
return -get_errno();
|
return -get_errno();
|
||||||
}
|
}
|
||||||
|
@ -449,7 +449,7 @@ ssize_t SysRecvMsg(int s, struct msghdr *message, int flags)
|
||||||
CHECK_ASPACE(message, sizeof(struct msghdr));
|
CHECK_ASPACE(message, sizeof(struct msghdr));
|
||||||
CPY_FROM_NONCONST_USER(message);
|
CPY_FROM_NONCONST_USER(message);
|
||||||
|
|
||||||
if (message && message->msg_iovlen > IOV_MAX) {
|
if (message && (size_t)message->msg_iovlen > IOV_MAX) {
|
||||||
set_errno(EMSGSIZE);
|
set_errno(EMSGSIZE);
|
||||||
return -get_errno();
|
return -get_errno();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue