public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: Re: [patch] ALSA: pcm: harmless underflow issue in snd_pcm_sw_params()
Date: Tue, 13 Oct 2015 09:39:41 +0000	[thread overview]
Message-ID: <s5heggzksyq.wl-tiwai@suse.de> (raw)
In-Reply-To: <20151013070756.GA31537@mwanda>

On Tue, 13 Oct 2015 09:07:56 +0200,
Dan Carpenter wrote:
> 
> "params->tstamp_mode" is a user supplied int.  We cap the maximum but
> allow negative values by mistake.  It's harmless but static checkers
> complain.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

You already sent the same fix and it was applied in the commit
145d92e77e6f.


thanks,

Takashi

> 
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index 75888dd..4863af5 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -650,7 +650,8 @@ static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
>  	}
>  	snd_pcm_stream_unlock_irq(substream);
>  
> -	if (params->tstamp_mode > SNDRV_PCM_TSTAMP_LAST)
> +	if (params->tstamp_mode < 0 ||
> +	    params->tstamp_mode > SNDRV_PCM_TSTAMP_LAST)
>  		return -EINVAL;
>  	if (params->proto >= SNDRV_PROTOCOL_VERSION(2, 0, 12) &&
>  	    params->tstamp_type > SNDRV_PCM_TSTAMP_TYPE_LAST)
> 

  reply	other threads:[~2015-10-13  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13  7:07 [patch] ALSA: pcm: harmless underflow issue in snd_pcm_sw_params() Dan Carpenter
2015-10-13  9:39 ` Takashi Iwai [this message]
2015-10-13 12:06   ` Dan Carpenter

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=s5heggzksyq.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.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