Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c60a1794
Commit
c60a1794
authored
Nov 04, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Copy msg_namelen back to user in recv{from,msg} even if it is zero.
parent
0244b384
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
net/socket.c
net/socket.c
+2
-2
No files found.
net/socket.c
View file @
c60a1794
...
@@ -1389,7 +1389,7 @@ asmlinkage long sys_recvfrom(int fd, void * ubuf, size_t size, unsigned flags,
...
@@ -1389,7 +1389,7 @@ asmlinkage long sys_recvfrom(int fd, void * ubuf, size_t size, unsigned flags,
flags
|=
MSG_DONTWAIT
;
flags
|=
MSG_DONTWAIT
;
err
=
sock_recvmsg
(
sock
,
&
msg
,
size
,
flags
);
err
=
sock_recvmsg
(
sock
,
&
msg
,
size
,
flags
);
if
(
err
>=
0
&&
addr
!=
NULL
&&
msg
.
msg_namelen
)
if
(
err
>=
0
&&
addr
!=
NULL
)
{
{
err2
=
move_addr_to_user
(
address
,
msg
.
msg_namelen
,
addr
,
addr_len
);
err2
=
move_addr_to_user
(
address
,
msg
.
msg_namelen
,
addr
,
addr_len
);
if
(
err2
<
0
)
if
(
err2
<
0
)
...
@@ -1613,7 +1613,7 @@ asmlinkage long sys_recvmsg(int fd, struct msghdr *msg, unsigned int flags)
...
@@ -1613,7 +1613,7 @@ asmlinkage long sys_recvmsg(int fd, struct msghdr *msg, unsigned int flags)
goto
out_freeiov
;
goto
out_freeiov
;
len
=
err
;
len
=
err
;
if
(
uaddr
!=
NULL
&&
msg_sys
.
msg_namelen
)
{
if
(
uaddr
!=
NULL
)
{
err
=
move_addr_to_user
(
addr
,
msg_sys
.
msg_namelen
,
uaddr
,
uaddr_len
);
err
=
move_addr_to_user
(
addr
,
msg_sys
.
msg_namelen
,
uaddr
,
uaddr_len
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
out_freeiov
;
goto
out_freeiov
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment