From e3a0dc07b7a6cbea46eb863c02df5d9cbd05ac08 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 13 Jul 1998 14:17:00 +0000 Subject: [PATCH] (dl_main): Correct tests in preloading interpreting lines. --- elf/rtld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/rtld.c b/elf/rtld.c index b5fc84286bc..dc63dd5a8c8 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -369,7 +369,7 @@ of this helper program; chances are you did not intend to run this program.\n", char *list = strdupa (preloadlist); char *p; list += strspn (list, " :"); - while (*list && (p = strsep (&list, " :")) != NULL) + while (list && *list && (p = strsep (&list, " :")) != NULL) if (! __libc_enable_secure || strchr (p, '/') == NULL) { struct link_map *new_map = _dl_map_object (l, p, 1, lt_library, 0); @@ -437,7 +437,7 @@ of this helper program; chances are you did not intend to run this program.\n", { char *p; runp = file + strspn (file, ": \t\n"); - while (*runp && (p = strsep (&runp, ": \t\n")) != NULL) + while (runp && *runp && (p = strsep (&runp, ": \t\n")) != NULL) { struct link_map *new_map = _dl_map_object (l, p, 1, lt_library, 0); -- 2.47.2