From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Clemens Ladisch <clemens@ladisch.de>,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
alsa-devel@alsa-project.org, Jaroslav Kysela <perex@perex.cz>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] ALSA: firewire-tascam: off by one in handle_midi_tx()
Date: Sat, 17 Oct 2015 10:12:17 +0000 [thread overview]
Message-ID: <s5hio65dcse.wl-tiwai@suse.de> (raw)
In-Reply-To: <20151015181711.GB3163@mwanda>
On Thu, 15 Oct 2015 20:17:11 +0200,
Dan Carpenter wrote:
>
> My static checker complains because tscm->spec->midi_capture_ports is
> either 2 or 4 but the tscm->tx_midi_substreams[] array has 4 elements so
> this is possibly off by one. I have looked at the code and I think it
> should be >= instead of > as well.
>
> Fixes: 107cc0129a68 ('ALSA: firewire-tascam: add support for incoming MIDI messages by asynchronous transaction')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks.
Takashi
>
> diff --git a/sound/firewire/tascam/tascam-transaction.c b/sound/firewire/tascam/tascam-transaction.c
> index 45c3ce3..d4f64ae 100644
> --- a/sound/firewire/tascam/tascam-transaction.c
> +++ b/sound/firewire/tascam/tascam-transaction.c
> @@ -158,7 +158,7 @@ static void handle_midi_tx(struct fw_card *card, struct fw_request *request,
>
> port = b[0] >> 4;
> /* TODO: support virtual MIDI ports. */
> - if (port > tscm->spec->midi_capture_ports)
> + if (port >= tscm->spec->midi_capture_ports)
> goto end;
>
> /* Assume the message length. */
>
prev parent reply other threads:[~2015-10-17 10:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 18:17 [patch 2/2] ALSA: firewire-tascam: off by one in handle_midi_tx() Dan Carpenter
2015-10-17 10:12 ` 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=s5hio65dcse.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=o-takashi@sakamocchi.jp \
--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