Searched hist:"6 d8b04de" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/sound/isa/cs423x/ |
H A D | cs4231.c | 6d8b04de Tue Jul 18 06:48:05 CDT 2017 Arnd Bergmann <arnd@arndb.de> ALSA: cs423x: fix format string overflow warning
The snd_pcm name may overflow the card->longname total size:
sound/isa/cs423x/cs4231.c: In function 'snd_cs4231_probe': sound/isa/cs423x/cs4231.c:115:26: error: ' at 0x' directive writing 6 bytes into a region of size between 1 and 80 [-Werror=format-overflow=] 0x%lx, irq %d, dma %d", sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes the driver to use snprintf() so we truncate the string instead of overflowing into the next field if that happens.
I decided to split out the second format string for the extra DMA channel to keep the code simpler.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> 6d8b04de Tue Jul 18 06:48:05 CDT 2017 Arnd Bergmann <arnd@arndb.de> ALSA: cs423x: fix format string overflow warning The snd_pcm name may overflow the card->longname total size: sound/isa/cs423x/cs4231.c: In function 'snd_cs4231_probe': sound/isa/cs423x/cs4231.c:115:26: error: ' at 0x' directive writing 6 bytes into a region of size between 1 and 80 [-Werror=format-overflow=] 0x%lx, irq %d, dma %d", sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes the driver to use snprintf() so we truncate the string instead of overflowing into the next field if that happens. I decided to split out the second format string for the extra DMA channel to keep the code simpler. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
H A D | cs4236.c | 6d8b04de Tue Jul 18 06:48:05 CDT 2017 Arnd Bergmann <arnd@arndb.de> ALSA: cs423x: fix format string overflow warning
The snd_pcm name may overflow the card->longname total size:
sound/isa/cs423x/cs4231.c: In function 'snd_cs4231_probe': sound/isa/cs423x/cs4231.c:115:26: error: ' at 0x' directive writing 6 bytes into a region of size between 1 and 80 [-Werror=format-overflow=] 0x%lx, irq %d, dma %d", sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes the driver to use snprintf() so we truncate the string instead of overflowing into the next field if that happens.
I decided to split out the second format string for the extra DMA channel to keep the code simpler.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> 6d8b04de Tue Jul 18 06:48:05 CDT 2017 Arnd Bergmann <arnd@arndb.de> ALSA: cs423x: fix format string overflow warning The snd_pcm name may overflow the card->longname total size: sound/isa/cs423x/cs4231.c: In function 'snd_cs4231_probe': sound/isa/cs423x/cs4231.c:115:26: error: ' at 0x' directive writing 6 bytes into a region of size between 1 and 80 [-Werror=format-overflow=] 0x%lx, irq %d, dma %d", sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes the driver to use snprintf() so we truncate the string instead of overflowing into the next field if that happens. I decided to split out the second format string for the extra DMA channel to keep the code simpler. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
|