From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Thu, 15 Oct 2015 18:18:29 +0000 Subject: [patch] ALSA: firewire-tascam: off by one in identify_model() Message-Id: <20151015181828.GC3163@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Clemens Ladisch , Takashi Sakamoto Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org In the original code, we potentially put a NUL character in model[8] and it caused a static checker warning. We can put the NUL in model[7] instead. Fixes: 53b3ffee7885 ('ALSA: firewire-tascam: change device probing processing') Signed-off-by: Dan Carpenter diff --git a/sound/firewire/tascam/tascam.c b/sound/firewire/tascam/tascam.c index c6747a4..6ef2bcc 100644 --- a/sound/firewire/tascam/tascam.c +++ b/sound/firewire/tascam/tascam.c @@ -51,7 +51,7 @@ static int identify_model(struct snd_tscm *tscm) } /* Pick up model name from certain addresses. */ - for (i = 0; i < 8; i++) { + for (i = 0; i < 7; i++) { c = config_rom[28 + i / 4] >> (24 - 8 * (i % 4)); if (c = '\0') break;