ALSA: seq: fix incorrect order of dest_client/dest_ports arguments
authorColin Ian King <colin.king@canonical.com>
Fri, 28 Jun 2019 09:54:29 +0000 (10:54 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 28 Jun 2019 10:03:58 +0000 (12:03 +0200)
There are two occurrances of a call to snd_seq_oss_fill_addr where
the dest_client and dest_port arguments are in the wrong order. Fix
this by swapping them around.

Addresses-Coverity: ("Arguments in wrong order")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/oss/seq_oss_ioctl.c
sound/core/seq/oss/seq_oss_rw.c

index 5b8520177b0ec9a67a848ccff39a8f9a80d73ee6..7d72e3d48ad5e50f79403c16ed4d193e88199f86 100644 (file)
@@ -62,7 +62,7 @@ static int snd_seq_oss_oob_user(struct seq_oss_devinfo *dp, void __user *arg)
        if (copy_from_user(ev, arg, 8))
                return -EFAULT;
        memset(&tmpev, 0, sizeof(tmpev));
-       snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
+       snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.client, dp->addr.port);
        tmpev.time.tick = 0;
        if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) {
                snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
index eb1ef12181f3d2237a186add22dc34185dc3f8ec..1063e1b16ea0f1f54119b96ca1d330edcc693c76 100644 (file)
@@ -174,7 +174,7 @@ insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
        memset(&event, 0, sizeof(event));
        /* set dummy -- to be sure */
        event.type = SNDRV_SEQ_EVENT_NOTEOFF;
-       snd_seq_oss_fill_addr(dp, &event, dp->addr.port, dp->addr.client);
+       snd_seq_oss_fill_addr(dp, &event, dp->addr.client, dp->addr.port);
 
        if (snd_seq_oss_process_event(dp, rec, &event))
                return 0; /* invalid event - no need to insert queue */