From c4f49a6a726fcd07bb15198ac4556100320934a9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 31 Jul 2013 14:05:41 -0400 Subject: [PATCH] fix bug where read error was treated as success reading library headers --- src/ldso/dynlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 3c963e22..59ec5b79 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -318,7 +318,7 @@ static void *map_library(int fd, struct dso *dso) size_t i; ssize_t l = read(fd, buf, sizeof buf); - if (le_phentsize * eh->e_phnum; if (phsize + sizeof *eh > l) return 0; -- 2.25.1