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
e88141bd
Commit
e88141bd
authored
Mar 08, 2004
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] R128 DRI limits checking.
This got fixed in 2.4, but somehow got missed in 2.6.
parent
c5d9af3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
drivers/char/drm/r128_state.c
drivers/char/drm/r128_state.c
+11
-0
No files found.
drivers/char/drm/r128_state.c
View file @
e88141bd
...
...
@@ -915,6 +915,9 @@ static int r128_cce_dispatch_write_span( drm_device_t *dev,
DRM_DEBUG
(
"
\n
"
);
count
=
depth
->
n
;
if
(
count
>
4096
||
count
<=
0
)
return
-
EMSGSIZE
;
if
(
DRM_COPY_FROM_USER
(
&
x
,
depth
->
x
,
sizeof
(
x
)
)
)
{
return
DRM_ERR
(
EFAULT
);
}
...
...
@@ -1008,6 +1011,8 @@ static int r128_cce_dispatch_write_pixels( drm_device_t *dev,
DRM_DEBUG
(
"
\n
"
);
count
=
depth
->
n
;
if
(
count
>
4096
||
count
<=
0
)
return
-
EMSGSIZE
;
xbuf_size
=
count
*
sizeof
(
*
x
);
ybuf_size
=
count
*
sizeof
(
*
y
);
...
...
@@ -1125,6 +1130,9 @@ static int r128_cce_dispatch_read_span( drm_device_t *dev,
DRM_DEBUG
(
"
\n
"
);
count
=
depth
->
n
;
if
(
count
>
4096
||
count
<=
0
)
return
-
EMSGSIZE
;
if
(
DRM_COPY_FROM_USER
(
&
x
,
depth
->
x
,
sizeof
(
x
)
)
)
{
return
DRM_ERR
(
EFAULT
);
}
...
...
@@ -1167,6 +1175,9 @@ static int r128_cce_dispatch_read_pixels( drm_device_t *dev,
DRM_DEBUG
(
"%s
\n
"
,
__FUNCTION__
);
count
=
depth
->
n
;
if
(
count
>
4096
||
count
<=
0
)
return
-
EMSGSIZE
;
if
(
count
>
dev_priv
->
depth_pitch
)
{
count
=
dev_priv
->
depth_pitch
;
}
...
...
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