This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for crash in NSS when libc built with--enable-static-nss and exe built with -static


On Mon, Apr 2, 2012 at 11:08 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> @@ -457,12 +457,12 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
>  # include "function.def"
>  		{ NULL, NULL }
>  	      };
> -	    size_t namlen = (5 + strlen (ni->library->name) + 1
> +	    size_t namlen = (5 + strlen (ni->name) + 1
>  			     + strlen (fct_name) + 1);
>  	    char name[namlen];
>
>  	    /* Construct the function name.  */
> -	    __stpcpy (__stpcpy (__stpcpy (name, ni->library->name),
> +	    __stpcpy (__stpcpy (__stpcpy (name, ni->name),
>  				"_"),
>  		      fct_name);

This is the only bit that is needed since the rest of the changes
within SHARED and will not be built with --enable-static-nss.
Technically it doesn't make a difference however, since the
pre-requisite for a service library being loaded for a service user is
that the names match.


-- 
Siddhesh Poyarekar
http://siddhesh.in


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]