Message ID | 55C8C56D.6080805@cs.ucla.edu |
---|---|
State | New |
Headers | show |
diff --git a/elf/rtld.c b/elf/rtld.c index 6bcf224..a6e81ce 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -2504,9 +2504,10 @@ process_dl_debug (const char *dl_debug) { /* Display a warning and skip everything until next separator. */ - char *copy = strndupa (dl_debug, len); - _dl_error_printf ("\ -warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy); + int deblen = MIN (len, 100); + _dl_error_printf (("warning: debug option '%.*s'%s unknown;" + " try LD_DEBUG=help\n"), + deblen, dl_debug, len < 100 ? "" : "..."); } dl_debug += len;