diff options
author | Tien Fong Chee <tien.fong.chee@intel.com> | 2017-08-30 13:15:42 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-09-15 05:27:48 -0600 |
commit | 18c991ca2bd72c30b7fb578cee8b5c7c835d383d (patch) | |
tree | 39ace856a3642978d835979649cf9a96b5865616 /lib | |
parent | d503114c66a76b5ceb9d72da2c9b5231eb6743b8 (diff) |
libfdt: Initialize the stack variable
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>
Diffstat (limited to 'lib')
-rw-r--r-- | 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 45fb964120..01adad0ee9 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; |