diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-07-18 13:48:07 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-07-18 17:53:56 +0200 |
commit | 24d220773139ae03fc7bda692c5f6335ea457059 (patch) | |
tree | bd39c79fd79130efdce0493a65a44d89eaeac002 /.gitignore | |
parent | ALSA: ad1848: fix format string overflow warning (diff) | |
download | linux-dev-24d220773139ae03fc7bda692c5f6335ea457059.tar.xz linux-dev-24d220773139ae03fc7bda692c5f6335ea457059.zip |
ALSA: opti9xx: fix format string overflow warning
We pass a long name from "codec->pcm->name" into the longname
string of the same length:
sound/isa/opti9xx/miro.c: In function 'snd_miro_probe':
sound/isa/opti9xx/miro.c:1356:39: error: '%s' directive writing up to 79 bytes into a region of size between 35 and 72 [-Werror=format-overflow=]
sprintf(card->longname, "%s: OPTi%s, %s at 0x%lx, irq %d, dma %d&%d",
^~
sound/isa/opti9xx/miro.c:1356:26: note: using the range [0, 4294967295] for directive argument
sprintf(card->longname, "%s: OPTi%s, %s at 0x%lx, irq %d, dma %d&%d",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/isa/opti9xx/miro.c:1356:2: note: 'sprintf' output between 32 and 185 bytes into a destination of size 80
sprintf(card->longname, "%s: OPTi%s, %s at 0x%lx, irq %d, dma %d&%d",
There is no easy way to avoid the theoretical overflow in this case,
but using snprintf() will turn it into a harmless truncation.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions