ALSA: firewire-tascam: off by one in identify_model()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 19 Oct 2015 11:29:27 +0000 (14:29 +0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 19 Oct 2015 12:00:49 +0000 (14:00 +0200)
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>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/tascam/tascam.c

index c2f42cd3f3b8c0f380f27b3224caef3f13a1ef01..ee0bc183950888ba6ade12bb8441fa81be41ec11 100644 (file)
@@ -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;