Explorar o código

fix uninitialized dyn variable in map_library

this can only happen for invalid library files, but they were not
detected reliably because the variable was uninitialized.
Rich Felker %!s(int64=11) %!d(string=hai) anos
pai
achega
7443dd271c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/ldso/dynlink.c

+ 1 - 1
src/ldso/dynlink.c

@@ -313,7 +313,7 @@ static void *map_library(int fd, struct dso *dso)
 	Phdr *ph, *ph0;
 	unsigned prot;
 	unsigned char *map, *base;
-	size_t dyn;
+	size_t dyn=0;
 	size_t tls_image=0;
 	size_t i;