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
52123103
Commit
52123103
authored
Jul 11, 2003
by
Alan Cox
Committed by
Steve French
Jul 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix security leaks and a crash in es1370
parent
f100aab7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
sound/oss/es1370.c
sound/oss/es1370.c
+6
-10
No files found.
sound/oss/es1370.c
View file @
52123103
...
@@ -889,8 +889,8 @@ static int mixer_ioctl(struct es1370_state *s, unsigned int cmd, unsigned long a
...
@@ -889,8 +889,8 @@ static int mixer_ioctl(struct es1370_state *s, unsigned int cmd, unsigned long a
}
}
if
(
cmd
==
SOUND_MIXER_INFO
)
{
if
(
cmd
==
SOUND_MIXER_INFO
)
{
mixer_info
info
;
mixer_info
info
;
str
l
cpy
(
info
.
id
,
"ES1370"
,
sizeof
(
info
.
id
));
str
n
cpy
(
info
.
id
,
"ES1370"
,
sizeof
(
info
.
id
));
str
l
cpy
(
info
.
name
,
"Ensoniq ES1370"
,
sizeof
(
info
.
name
));
str
n
cpy
(
info
.
name
,
"Ensoniq ES1370"
,
sizeof
(
info
.
name
));
info
.
modify_counter
=
s
->
mix
.
modcnt
;
info
.
modify_counter
=
s
->
mix
.
modcnt
;
if
(
copy_to_user
((
void
*
)
arg
,
&
info
,
sizeof
(
info
)))
if
(
copy_to_user
((
void
*
)
arg
,
&
info
,
sizeof
(
info
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -898,8 +898,8 @@ static int mixer_ioctl(struct es1370_state *s, unsigned int cmd, unsigned long a
...
@@ -898,8 +898,8 @@ static int mixer_ioctl(struct es1370_state *s, unsigned int cmd, unsigned long a
}
}
if
(
cmd
==
SOUND_OLD_MIXER_INFO
)
{
if
(
cmd
==
SOUND_OLD_MIXER_INFO
)
{
_old_mixer_info
info
;
_old_mixer_info
info
;
str
l
cpy
(
info
.
id
,
"ES1370"
,
sizeof
(
info
.
id
));
str
n
cpy
(
info
.
id
,
"ES1370"
,
sizeof
(
info
.
id
));
str
l
cpy
(
info
.
name
,
"Ensoniq ES1370"
,
sizeof
(
info
.
name
));
str
n
cpy
(
info
.
name
,
"Ensoniq ES1370"
,
sizeof
(
info
.
name
));
if
(
copy_to_user
((
void
*
)
arg
,
&
info
,
sizeof
(
info
)))
if
(
copy_to_user
((
void
*
)
arg
,
&
info
,
sizeof
(
info
)))
return
-
EFAULT
;
return
-
EFAULT
;
return
0
;
return
0
;
...
@@ -2484,12 +2484,8 @@ static int es1370_midi_release(struct inode *inode, struct file *file)
...
@@ -2484,12 +2484,8 @@ static int es1370_midi_release(struct inode *inode, struct file *file)
break
;
break
;
if
(
signal_pending
(
current
))
if
(
signal_pending
(
current
))
break
;
break
;
if
(
file
->
f_flags
&
O_NONBLOCK
)
{
if
(
file
->
f_flags
&
O_NONBLOCK
)
remove_wait_queue
(
&
s
->
midi
.
owait
,
&
wait
);
break
;
set_current_state
(
TASK_RUNNING
);
unlock_kernel
();
return
-
EBUSY
;
}
tmo
=
(
count
*
HZ
)
/
3100
;
tmo
=
(
count
*
HZ
)
/
3100
;
if
(
!
schedule_timeout
(
tmo
?
:
1
)
&&
tmo
)
if
(
!
schedule_timeout
(
tmo
?
:
1
)
&&
tmo
)
DBG
(
printk
(
KERN_DEBUG
"es1370: midi timed out??
\n
"
);)
DBG
(
printk
(
KERN_DEBUG
"es1370: midi timed out??
\n
"
);)
...
...
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