summaryrefslogtreecommitdiff
path: root/sound/pci/mixart
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-18 13:48:07 +0200
committerTakashi Iwai <tiwai@suse.de>2017-07-18 17:53:56 +0200
commit24d220773139ae03fc7bda692c5f6335ea457059 (patch)
treebd39c79fd79130efdce0493a65a44d89eaeac002 /sound/pci/mixart
parent003d3e70dbebe9d99387f2eeda405b1950b808f2 (diff)
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 'sound/pci/mixart')
0 files changed, 0 insertions, 0 deletions