Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Embedded whitespace in dirname is supporte...



details:   https://anonhg.NetBSD.org/src/rev/bc8b8b1eb386
branches:  trunk
changeset: 537812:bc8b8b1eb386
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Sun Oct 06 01:36:36 2002 +0000

description:
Embedded whitespace in dirname is supported again.

diffstat:

 libexec/ld.elf_so/paths.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r bfdd7732b63f -r bc8b8b1eb386 libexec/ld.elf_so/paths.c
--- a/libexec/ld.elf_so/paths.c Sun Oct 06 01:36:09 2002 +0000
+++ b/libexec/ld.elf_so/paths.c Sun Oct 06 01:36:36 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: paths.c,v 1.24 2002/10/05 16:26:37 junyoung Exp $       */
+/*     $NetBSD: paths.c,v 1.25 2002/10/06 01:36:36 junyoung Exp $       */
 
 /*
  * Copyright 1996 Matt Thomas <matt%3am-software.com@localhost>
@@ -363,10 +363,12 @@
                }
 
                doing_path = *b == '/';
-               if (doing_path)
-                       path_p = _rtld_append_path(head_p, path_p, b, 
-                           strcspn(b, " \t"));
-               else {
+               if (doing_path) {
+                       size_t tmp = len - 1;
+                       while (b[tmp] == '#' || b[tmp] == ' ' || b[tmp] == '\t')
+                               tmp--;
+                       path_p = _rtld_append_path(head_p, path_p, b, tmp + 1);
+               } else {
                        char tmp = b[len];
                        b[len] = '\0';
                        _rtld_process_mapping(lib_p, b, len);



Home | Main Index | Thread Index | Old Index