1. 18 Jul, 2017 3 commits
    • Arnd Bergmann's avatar
      ALSA: cs423x: fix format string overflow warning · 6d8b04de
      Arnd Bergmann authored
      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: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6d8b04de
    • Arnd Bergmann's avatar
      ALSA: als100: fix format string overflow warning · 8a463639
      Arnd Bergmann authored
      The compiler sees that the format string might overflow for the longname:
      
      sound/isa/als100.c: In function 'snd_als100_pnp_detect':
      sound/isa/als100.c:225:27: error: ', dma ' directive writing 6 bytes into a region of size between 0 and 64 [-Werror=format-overflow=]
         sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d",
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      sound/isa/als100.c:225:3: note: 'sprintf' output between 24 and 113 bytes into a destination of size 80
         sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d",
      
      Open-coding "shortname" here gets us below the limit, and using
      snprintf() is a good idea too.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8a463639
    • Andy Shevchenko's avatar
      ALSA: fm801: Initialize chip after IRQ handler is registered · 610e1ae9
      Andy Shevchenko authored
      The commit b56fa687 ("ALSA: fm801: detect FM-only card earlier")
      rearranged initialization calls, i.e. it makes snd_fm801_chip_init() to
      be called before we register interrupt handler and set PCI bus
      mastering.
      
      Somehow it prevents FM801-AU to work properly. Thus, partially revert
      initialization order changed by commit mentioned above.
      
      Fixes: b56fa687 ("ALSA: fm801: detect FM-only card earlier")
      Reported-by: default avatarÉmeric MASCHINO <emeric.maschino@gmail.com>
      Tested-by: default avatarÉmeric MASCHINO <emeric.maschino@gmail.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.5+
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      610e1ae9
  2. 17 Jul, 2017 1 commit
  3. 15 Jul, 2017 1 commit
  4. 12 Jul, 2017 1 commit
  5. 11 Jul, 2017 1 commit
  6. 10 Jul, 2017 2 commits
  7. 07 Jul, 2017 2 commits
  8. 06 Jul, 2017 1 commit
  9. 04 Jul, 2017 1 commit
  10. 03 Jul, 2017 27 commits