Browse Source

[LibOS] Variable len is used without initilization

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Zhang Chen 5 years ago
parent
commit
f8059d338b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      LibOS/shim/src/elf/shim_rtld.c

+ 1 - 1
LibOS/shim/src/elf/shim_rtld.c

@@ -1040,7 +1040,7 @@ static int __load_elf_object (struct shim_handle * file, void * addr,
                               int type, struct link_map * remap)
 {
     char * hdr = addr;
-    int len, ret = 0;
+    int len = 0, ret = 0;
 
     if (type == OBJECT_LOAD || type == OBJECT_REMAP) {
         hdr = __alloca(FILEBUF_SIZE);