git: rtld: Fix gethints()

John Marino marino at crater.dragonflybsd.org
Mon May 7 15:15:03 PDT 2012


commit 1ff8a2bd3eb6e5587174c6a983303ea3a79e0002
Author: John Marino <draco at marino.st>
Date:   Mon May 7 17:56:36 2012 +0200

    rtld: Fix gethints()
    
    The function that retrieves the hints file contents had a logic flaw.
    It's supposed to return either the full or filtered version of the
    hints file depending if the object has the nodefaultlib flag set or
    not.  The problem was that every subsequent call would return the
    first call's result regardless of the nodefaultlib flag setting.
    
    The function's API was changed to simplify the code.  The function is
    never called without a valid object, so there was no need to test for
    that in order the check the nodefaultlib flag.  Now the flag is passed
    to gethints() directly.
    
    Reported and submitted by: Konstantin Belousov

Summary of changes:
 libexec/rtld-elf/rtld.c |  175 ++++++++++++++++++++++++-----------------------
 1 files changed, 88 insertions(+), 87 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1ff8a2bd3eb6e5587174c6a983303ea3a79e0002


-- 
DragonFly BSD source repository





More information about the Commits mailing list