Skip to contentSkip to conversation

pcm: add MMAP_EMUL to type names

PATCH Applied Dan Carpenter 2 participants 2 messages Nov 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcm: add MMAP_EMUL to type names

If we try to print this then it causes a read past the end of the array in snd_pcm_type_name().

src/pcm/pcm.c +1 -0
index 7409943..906b502 100644
@@ -1633,6 +1633,7 @@ static const char *const snd_pcm_type_names[] = {
 	PCMTYPE(SOFTVOL),
         PCMTYPE(IOPLUG),
         PCMTYPE(EXTPLUG),
+	PCMTYPE(MMAP_EMUL),
 };
 
 static const char *const snd_pcm_subformat_names[] = {
#1 lore raw
Quoted 2 lines · Dan Carpenter

If we try to print this then it causes a read past the end of the array in snd_pcm_type_name().

Applied. Thanks.

Jaroslav

Quoted 7 lines
src/pcm/pcm.c +0 -0
index 7409943..906b502 100644

src/pcm/pcm.c static const char *const snd_pcm_type_names[] = { · line 1639

Quoted 7 lines
src/pcm/pcm.c +1 -0
@@ -1633,6 +1633,7 @@ static const char *const snd_pcm_type_names[] = {
 	PCMTYPE(SOFTVOL),
        PCMTYPE(IOPLUG),
        PCMTYPE(EXTPLUG),
+	PCMTYPE(MMAP_EMUL),
 };
 
 static const char *const snd_pcm_subformat_names[] = {

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.