fix uninitialized dyn variable in map_library
authorRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2013 13:25:12 +0000 (09:25 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2013 13:25:12 +0000 (09:25 -0400)
this can only happen for invalid library files, but they were not
detected reliably because the variable was uninitialized.

src/ldso/dynlink.c

index 2f399a57cd20a0a4b314e17a49346b29eb443406..63a2554823107709ee942bf7d02b43a6a8de0e6f 100644 (file)
@@ -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;