mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Jaroslav Kysela" <perex@perex.cz>, <alsa-devel@alsa-project.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/7] ALSA: als100: fix format string overflow warning
Date: Tue, 18 Jul 2017 18:00:01 +0200	[thread overview]
Message-ID: <s5hy3rlag72.wl-tiwai@suse.de> (raw)
In-Reply-To: <20170718114820.3681255-1-arnd@arndb.de>

On Tue, 18 Jul 2017 13:48:04 +0200,
Arnd Bergmann wrote:
> 
> 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: Arnd Bergmann <arnd@arndb.de>

Thanks, applied all 7 patches now to for-next branch.


Takashi

      parent reply	other threads:[~2017-07-18 16:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 11:48 Arnd Bergmann
2017-07-18 11:48 ` [PATCH v2 2/7] ALSA: cs423x: " Arnd Bergmann
2017-07-18 11:48 ` [PATCH v2 3/7] ALSA: ad1848: " Arnd Bergmann
2017-07-18 11:48 ` [PATCH v2 4/7] ALSA: opti9xx: " Arnd Bergmann
2017-07-18 11:48 ` [PATCH v2 5/7] ALSA: mixart: fix " Arnd Bergmann
2017-07-18 11:48 ` [PATCH v2 6/7] ALSA: rme9652: fix format overflow warnings Arnd Bergmann
2017-07-18 11:48 ` [PATCH v2 7/7] ALSA: pcxhr: fix string " Arnd Bergmann
2017-07-18 16:00 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hy3rlag72.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®