All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chee, Tien Fong <tien.fong.chee@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] libfdt: Initialize the stack variable
Date: Fri, 25 Aug 2017 04:01:36 +0000	[thread overview]
Message-ID: <1503633696.10882.4.camel@intel.com> (raw)
In-Reply-To: <20170825010434.GK17193@bill-the-cat>

On Kha, 2017-08-24 at 21:04 -0400, Tom Rini wrote:
> On Thu, Aug 24, 2017 at 01:53:57PM +0800, tien.fong.chee at intel.com
> wrote:
> 
> > 
> > From: Tien Fong Chee <tien.fong.chee@intel.com>
> > 
> > Report Coverity log:
> > The code uses a variable that has not
> > been initialized, leading to unpredictable
> > or unintended results.
> > 
> > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > ---
> >  lib/libfdt/fdt_wip.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/lib/libfdt/fdt_wip.c b/lib/libfdt/fdt_wip.c
> > index 45fb964..01adad0 100644
> > --- a/lib/libfdt/fdt_wip.c
> > +++ b/lib/libfdt/fdt_wip.c
> > @@ -115,7 +115,7 @@ int fdt_find_regions(const void *fdt, char *
> > const inc[], int inc_count,
> >  		     struct fdt_region region[], int max_regions,
> >  		     char *path, int path_len, int add_string_tab)
> >  {
> > -	int stack[FDT_MAX_DEPTH];
> > +	int stack[FDT_MAX_DEPTH] = { 0 };
> >  	char *end;
> >  	int nextoffset = 0;
> >  	uint32_t tag;
> Since this comes from libfdt, have you checked there as well?  And in
> general, we use a Reported-by: Coverity (CID: xxxx) for issues.  BTW,
> if
> you would like access to the community version of Coverity, please
> sign
> up at https://scan.coverity.com/projects/das-u-boot?tab=overview
> thanks!
I think we didn't check all of them, our coverity only check against
our socfpga use cases. But, i failed to "Add me to project", i can't
view all the defects. Does community coverity found the similar warning
as this patch?

Thanks.
> 

  reply	other threads:[~2017-08-25  4:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24  5:53 [U-Boot] [PATCH] libfdt: Initialize the stack variable tien.fong.chee at intel.com
2017-08-25  1:04 ` Tom Rini
2017-08-25  4:01   ` Chee, Tien Fong [this message]
2017-08-30  5:01   ` Chee, Tien Fong
  -- strict thread matches above, loose matches on Subject: below --
2017-08-30  5:15 tien.fong.chee at intel.com
2017-08-30 13:31 ` J. William Campbell
2017-09-05  3:41   ` Chee, Tien Fong
2017-09-05  3:58     ` J. William Campbell
2017-09-15 19:25       ` sjg at google.com

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=1503633696.10882.4.camel@intel.com \
    --to=tien.fong.chee@intel.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.