projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d503114
)
libfdt: Initialize the stack variable
author
Tien Fong Chee
<tien.fong.chee@intel.com>
Wed, 30 Aug 2017 05:15:42 +0000
(13:15 +0800)
committer
Simon Glass
<sjg@chromium.org>
Fri, 15 Sep 2017 11:27:48 +0000
(
05:27
-0600)
Report Coverity log:
The code uses a variable that has not
been initialized, leading to unpredictable
or unintended results.
Reported-by: Coverity (CID: 60519)
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
lib/libfdt/fdt_wip.c
patch
|
blob
|
history
diff --git
a/lib/libfdt/fdt_wip.c
b/lib/libfdt/fdt_wip.c
index 45fb9641206f4f74948c639004e7c8b92958a54e..01adad0ee97b18693cbd90f2b6f19f9b23f6e410 100644
(file)
--- 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;