Projects
Eulaceura:Mainline
lwip
_service:obs_scm:0008-gazelle-fix-lwip_accept-m...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0008-gazelle-fix-lwip_accept-memcpy-sockaddr-large.patch of Package lwip
From bf1c7febb9f6c3a2336f18f658694393dea451ae Mon Sep 17 00:00:00 2001 From: jiangheng <jiangheng12@huawei.com> Date: Fri, 16 Jul 2021 14:44:03 +0800 Subject: [PATCH] [Huawei]gazelle: fix lwip_accept memcpy sockaddr larger than actual --- src/api/sockets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/sockets.c b/src/api/sockets.c index 7ccac78..1c3d4a3 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -899,6 +899,8 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) if (*addrlen > IPADDR_SOCKADDR_GET_LEN(&tempaddr)) { *addrlen = IPADDR_SOCKADDR_GET_LEN(&tempaddr); } +#else + *addrlen = LWIP_MIN(*addrlen, sizeof(tempaddr)); #endif /* USE_LIBOS */ MEMCPY(addr, &tempaddr, *addrlen); -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2