projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0c6cb0
)
fix bug where read error was treated as success reading library headers
author
Rich Felker
<dalias@aerifal.cx>
Wed, 31 Jul 2013 18:05:41 +0000
(14:05 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 31 Jul 2013 18:05:41 +0000
(14:05 -0400)
src/ldso/dynlink.c
patch
|
blob
|
history
diff --git
a/src/ldso/dynlink.c
b/src/ldso/dynlink.c
index 3c963e22a20ec2e734fc7700eecda1207743efe4..59ec5b79124b70a3d184b54d60b4303529428f56 100644
(file)
--- 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 (l<sizeof *eh) return 0;
+ if (l<
(int)
sizeof *eh) return 0;
eh = buf;
phsize = eh->e_phentsize * eh->e_phnum;
if (phsize + sizeof *eh > l) return 0;