From: Dan Carpenter <dan.carpenter@oracle.com> To: Clemens Ladisch <clemens@ladisch.de> Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Takashi Sakamoto <o-takashi@sakamocchi.jp>, alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org Subject: [patch v2] ALSA: firewire-tascam: off by one in identify_model() Date: Mon, 19 Oct 2015 11:29:27 +0000 [thread overview] Message-ID: <20151019112927.GA31691@mwanda> (raw) In-Reply-To: <5622EF20.6010708@sakamocchi.jp> Let's leave space for the NUL char otherwise the static checkers complain that we go beyond the end of the array. Fixes: 53b3ffee7885 ('ALSA: firewire-tascam: change device probing processing') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- v2: I truncated the last char in v1 instead of making the buffer larger diff --git a/sound/firewire/tascam/tascam.c b/sound/firewire/tascam/tascam.c index c6747a4..79cb9e9 100644 --- a/sound/firewire/tascam/tascam.c +++ b/sound/firewire/tascam/tascam.c @@ -40,7 +40,7 @@ static int identify_model(struct snd_tscm *tscm) { struct fw_device *fw_dev = fw_parent_device(tscm->unit); const u32 *config_rom = fw_dev->config_rom; - char model[8]; + char model[9]; unsigned int i; u8 c;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: Clemens Ladisch <clemens@ladisch.de> Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Takashi Sakamoto <o-takashi@sakamocchi.jp>, alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org Subject: [patch v2] ALSA: firewire-tascam: off by one in identify_model() Date: Mon, 19 Oct 2015 14:29:27 +0300 [thread overview] Message-ID: <20151019112927.GA31691@mwanda> (raw) In-Reply-To: <5622EF20.6010708@sakamocchi.jp> Let's leave space for the NUL char otherwise the static checkers complain that we go beyond the end of the array. Fixes: 53b3ffee7885 ('ALSA: firewire-tascam: change device probing processing') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- v2: I truncated the last char in v1 instead of making the buffer larger diff --git a/sound/firewire/tascam/tascam.c b/sound/firewire/tascam/tascam.c index c6747a4..79cb9e9 100644 --- a/sound/firewire/tascam/tascam.c +++ b/sound/firewire/tascam/tascam.c @@ -40,7 +40,7 @@ static int identify_model(struct snd_tscm *tscm) { struct fw_device *fw_dev = fw_parent_device(tscm->unit); const u32 *config_rom = fw_dev->config_rom; - char model[8]; + char model[9]; unsigned int i; u8 c;
next prev parent reply other threads:[~2015-10-19 11:29 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-15 18:18 [patch] ALSA: firewire-tascam: off by one in identify_model() Dan Carpenter 2015-10-15 18:18 ` Dan Carpenter 2015-10-17 10:11 ` Takashi Iwai 2015-10-17 10:11 ` Takashi Iwai 2015-10-17 12:02 ` Dan Carpenter 2015-10-17 12:02 ` Dan Carpenter 2015-10-18 1:00 ` Takashi Sakamoto 2015-10-18 1:00 ` Takashi Sakamoto 2015-10-19 11:29 ` Dan Carpenter [this message] 2015-10-19 11:29 ` [patch v2] " Dan Carpenter 2015-10-19 11:54 ` Takashi Sakamoto 2015-10-19 11:54 ` Takashi Sakamoto 2015-10-19 12:01 ` Takashi Iwai 2015-10-19 12:01 ` Takashi Iwai
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=20151019112927.GA31691@mwanda \ --to=dan.carpenter@oracle.com \ --cc=alsa-devel@alsa-project.org \ --cc=clemens@ladisch.de \ --cc=kernel-janitors@vger.kernel.org \ --cc=o-takashi@sakamocchi.jp \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.