]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: add more format names
authorDan Carpenter <error27@gmail.com>
Fri, 27 Aug 2010 20:02:15 +0000 (22:02 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 28 Aug 2010 09:59:33 +0000 (11:59 +0200)
commita7a1e07fe4d88135141c98157de6700d205ba466
tree3b3af569f7451b45941f9089494eb30487b7cb6f
parent8d49bc26d6e8c4ed1b2edb787d7fba5ed2f39375
ALSA: pcm: add more format names

There were some new formats added in commit 4480c2761fb8 "ALSA: pcm:
Define G723 3-bit and 5-bit formats".  That commit increased
SNDRV_PCM_FORMAT_LAST as well.  My concern is that there are a couple
places which do:

        for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) {
                if (dummy->pcm_hw.formats & (1ULL << i))
                        snd_iprintf(buffer, " %s", snd_pcm_format_name(i));
        }

I haven't tested these but it looks like if "i" were equal to
SNDRV_PCM_FORMAT_G723_24 or higher then we might read past the end of
the array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm.c