mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: air icy <icytxw@gmail.com>
Cc: alsa-devel@alsa-project.org, perex@perex.cz,
	linux-kernel@vger.kernel.org
Subject: Re: UBSAN: Undefined behaviour in sound/core/timer.c
Date: Sun, 24 Jun 2018 09:46:21 +0200	[thread overview]
Message-ID: <s5hlgb4eieq.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAAzSK-xprFD+pFQ2HCOQgUZ+erC=U4rPZAPEtrWpmx_qPt_1uA@mail.gmail.com>

On Sun, 24 Jun 2018 09:11:42 +0200,
air icy wrote:
> 
> Hi Takashi,
> 
> You are a responsible man.
> I repro this bug in *https://github.com/lcytxw/bug_repro/tree/master/bug_200213
> <https://github.com/lcytxw/bug_repro/tree/master/bug_200213>*
> This patch is ok since I can't repro this bug anymore.

Good to hear.

Would you like put your reported-by and tested-by tags?
If yes, please give it explicitly.  It's be better to give a real name
than a nick name there in general.

Oh, and your another report for seq_client.c should be handled
similarly, a patch like below.  Please give it a try.


thanks,

Takashi

---
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2004,7 +2004,8 @@ static int snd_seq_ioctl_query_next_client(struct snd_seq_client *client,
 	struct snd_seq_client *cptr = NULL;
 
 	/* search for next client */
-	info->client++;
+	if (info->client < INT_MAX)
+		info->client++;
 	if (info->client < 0)
 		info->client = 0;
 	for (; info->client < SNDRV_SEQ_MAX_CLIENTS; info->client++) {

      parent reply	other threads:[~2018-06-24  7:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAzSK-ytpsK31p1+_21gEzUT8R=q3+J3ZrhZD_VP=AOC8EfLmQ@mail.gmail.com>
2018-06-24  5:43 ` Takashi Iwai
     [not found]   ` <CAAzSK-xprFD+pFQ2HCOQgUZ+erC=U4rPZAPEtrWpmx_qPt_1uA@mail.gmail.com>
2018-06-24  7:46     ` 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=s5hlgb4eieq.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=icytxw@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®