diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-08-06 19:27:51 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-08-06 19:27:51 +0000 |
commit | bd61f74bf3cb8f0ff7906db1c9ff745925af8980 (patch) | |
tree | 525774054d4a0ec910cd339352c3b5ac7f8a5b78 /ldso | |
parent | 6996c5c48239852d4bd398c8ee98fa1d5602cc7c (diff) |
If /etc/ld.so.preload was size 0, the shared lib loader would
choke and die. Test for non-zero size as well,
-Erik
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/boot1.c | 2 | ||||
-rw-r--r-- | ldso/ldso/ldso.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ldso/ldso/boot1.c b/ldso/ldso/boot1.c index 4a3dbcea8..038a68dbb 100644 --- a/ldso/ldso/boot1.c +++ b/ldso/ldso/boot1.c @@ -672,7 +672,7 @@ found_got: struct stat st; char *preload; - if (!_dl_stat(LDSO_PRELOAD, &st)) { + if (!_dl_stat(LDSO_PRELOAD, &st) && st.st_size > 0) { if ((fd = _dl_open(LDSO_PRELOAD, O_RDONLY)) < 0) { _dl_fprintf(2, "%s: can't open file '%s'\n", _dl_progname, LDSO_PRELOAD); diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 4a3dbcea8..038a68dbb 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -672,7 +672,7 @@ found_got: struct stat st; char *preload; - if (!_dl_stat(LDSO_PRELOAD, &st)) { + if (!_dl_stat(LDSO_PRELOAD, &st) && st.st_size > 0) { if ((fd = _dl_open(LDSO_PRELOAD, O_RDONLY)) < 0) { _dl_fprintf(2, "%s: can't open file '%s'\n", _dl_progname, LDSO_PRELOAD); |