Explorar o código

[LibOS] Variable len is used without initilization

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Zhang Chen %!s(int64=5) %!d(string=hai) anos
pai
achega
f8059d338b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);