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
Kirill Smelkov
linux
Commits
d618d88d
Commit
d618d88d
authored
Dec 02, 2002
by
Linus Torvalds
Committed by
Linus Torvalds
Dec 02, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up getdents64() user pointer checking from -mm merge
parent
c384a968
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fs/readdir.c
fs/readdir.c
+2
-2
No files found.
fs/readdir.c
View file @
d618d88d
...
@@ -229,7 +229,7 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
...
@@ -229,7 +229,7 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
goto
efault
;
goto
efault
;
if
(
copy_to_user
(
dirent
->
d_name
,
name
,
namlen
))
if
(
copy_to_user
(
dirent
->
d_name
,
name
,
namlen
))
goto
efault
;
goto
efault
;
if
(
put_user
(
0
,
dirent
->
d_name
+
namlen
))
if
(
__
put_user
(
0
,
dirent
->
d_name
+
namlen
))
goto
efault
;
goto
efault
;
((
char
*
)
dirent
)
+=
reclen
;
((
char
*
)
dirent
)
+=
reclen
;
buf
->
current_dir
=
dirent
;
buf
->
current_dir
=
dirent
;
...
@@ -247,7 +247,7 @@ asmlinkage long sys_getdents64(unsigned int fd, void * dirent, unsigned int coun
...
@@ -247,7 +247,7 @@ asmlinkage long sys_getdents64(unsigned int fd, void * dirent, unsigned int coun
int
error
;
int
error
;
error
=
-
EFAULT
;
error
=
-
EFAULT
;
if
(
!
access_ok
(
VERIFY_WRITE
,
dirent
,
sizeof
(
struct
linux_dirent64
)
))
if
(
!
access_ok
(
VERIFY_WRITE
,
dirent
,
count
))
goto
out
;
goto
out
;
error
=
-
EBADF
;
error
=
-
EBADF
;
...
...
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