summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/ld/rtld/rtld.c4
-rw-r--r--libexec/rtld-aout/rtld.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c
index cbba78e..6321a11 100644
--- a/gnu/usr.bin/ld/rtld/rtld.c
+++ b/gnu/usr.bin/ld/rtld/rtld.c
@@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
*/
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
bp->hi_major == major) {
+ struct stat s;
+
+ if (stat(hstrtab + bp->hi_pathx, &s) == -1)
+ return NULL; /* Doesn't actually exist */
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
return strdup(hstrtab + bp->hi_pathx);
}
diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c
index cbba78e..6321a11 100644
--- a/libexec/rtld-aout/rtld.c
+++ b/libexec/rtld-aout/rtld.c
@@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
*/
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
bp->hi_major == major) {
+ struct stat s;
+
+ if (stat(hstrtab + bp->hi_pathx, &s) == -1)
+ return NULL; /* Doesn't actually exist */
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
return strdup(hstrtab + bp->hi_pathx);
}
OpenPOWER on IntegriCloud