From: Colin Ian King <colin.king@canonical.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: static analysis bug report: ALSA: swapped client and port arguments in calls to snd_seq_oss_fill_addr
Date: Thu, 27 Jun 2019 15:01:40 +0100 [thread overview]
Message-ID: <28c3fc44-0d4c-25e2-c9f4-d240c6d239f0@canonical.com> (raw)
Hi there,
Static analysis with Coverity has picked up two potential issues with
the call to function snd_seq_oss_fill_addr. The prototype of
snd_seq_oss_fill_addr is as follows:
static inline void
snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event
*ev,int dest_client, int dest_port)
However, in sound/core/seq/oss/seq_oss_ioctl.c in function
snd_seq_oss_oob_user it is being called as follows:
snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
and also in sound/core/seq/oss/seq_oss_rw.c in function is it also being
called as follows:
snd_seq_oss_fill_addr(dp, &event, dp->addr.port, dp->addr.client);
..as one can see, in both cases the port and client arguments are
swapped compared to the function prototype. I doubt this is intentional
but you never know. Are these bugs?
Colin
next reply other threads:[~2019-06-27 14:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 14:01 Colin Ian King [this message]
2019-06-28 9:22 ` 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=28c3fc44-0d4c-25e2-c9f4-d240c6d239f0@canonical.com \
--to=colin.king@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--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: 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®