projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc7320c
)
[ALSA] Fix possible invalid memory access in PCM core
author
Takashi Iwai
<tiwai@suse.de>
Thu, 1 Feb 2007 13:53:49 +0000
(14:53 +0100)
committer
Jaroslav Kysela
<perex@suse.cz>
Fri, 9 Feb 2007 08:03:31 +0000
(09:03 +0100)
snd_internval_list() may access invalid memory in the case count = 0
is given. It shouldn't be passed, but it'd better to make the code
a bit more robust.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/core/pcm_lib.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/pcm_lib.c
b/sound/core/pcm_lib.c
index b336797be4fc877f4cd2ff0e8fa1e9e184ff2774..9fefcaa2c324e5a4c740a9653945185a212e5374 100644
(file)
--- a/
sound/core/pcm_lib.c
+++ b/
sound/core/pcm_lib.c
@@
-781,6
+781,11
@@
int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *
{
unsigned int k;
int changed = 0;
+
+ if (!count) {
+ i->empty = 1;
+ return -EINVAL;
+ }
for (k = 0; k < count; k++) {
if (mask && !(mask & (1 << k)))
continue;