OSDN Git Service

ldso: setup search path even when there are no "/"
authorMike Frysinger <vapier@gentoo.org>
Mon, 2 Jan 2012 07:43:37 +0000 (02:43 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 2 Jan 2012 08:02:53 +0000 (03:02 -0500)
commit97774e90d694f802ff0cfbf15687af77c6f7239e
tree2c464c571ddb07f3a01cbc295700430bb52248f8
parentb3436addb5ccf14d7fffcf5503644e9a62aaec4e
ldso: setup search path even when there are no "/"

If people use an interp path such as "ld.so", then there is no "/" found,
and we end up dereferencing a NULL pointer.  Simplify the logic by having
a relative interp path like that be the same as "" (which the code later
on interprets as $PWD).

While we're here, document some of the nuances of this code.

Reported-by: Ignacy Gawędzki <uclibc@qult.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
ldso/ldso/ldso.c