public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>,
	David Henningsson <david.henningsson@canonical.com>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ALSA: hda - potential (but unlikely) uninitialized variable
Date: Fri, 17 Apr 2015 12:46:00 +0000	[thread overview]
Message-ID: <20150417124600.GB16501@mwanda> (raw)
In-Reply-To: <s5h383zx6xu.wl-tiwai@suse.de>

On Fri, Apr 17, 2015 at 02:42:05PM +0200, Takashi Iwai wrote:
> At Fri, 17 Apr 2015 15:35:15 +0300,
> Dan Carpenter wrote:
> > 
> > This function is a bit unusual because it accepts negative values as
> > "conn_len".  It's theoretically possible for both "cache_len" and
> > "conn_len" to be -ENOSPC and in that case we would oops trying to run
> > memcmp() on the uninitialized "list" pointer.
> 
> Yes, that's a bug.  But the check should be rather:
> 
> 	if (cache_len >= 0 && (cache_len != conn_len ||
> 		    memcmp(list, conn, conn_len) != 0))
> 
> Could you resend with this fix?

Sure.  Will do.

regards,
dan carpenter


  reply	other threads:[~2015-04-17 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 12:35 [patch] ALSA: hda - potential (but unlikely) uninitialized variable Dan Carpenter
2015-04-17 12:42 ` Takashi Iwai
2015-04-17 12:46   ` Dan Carpenter [this message]
2015-04-17 13:19   ` [patch v2] " Dan Carpenter
2015-04-17 13:32     ` 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=20150417124600.GB16501@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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