This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Mangle NULL pointers in iconv/gconv [BZ #22025]
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 29 Aug 2017 16:13:18 +0200
- Subject: Re: [PATCH] Mangle NULL pointers in iconv/gconv [BZ #22025]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1F6DD356EA
- References: <50ea6b93-b58a-fdad-c178-a188ff6b6728@redhat.com>
*sigh*
Right after pushing I realized that the entire premise of this patch is
bogus.
Code like this:
/* Get the conversion functions. */
fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
__gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct;
#ifdef PTR_DEMANGLE
if (fcts->towc->__shlib_handle != NULL)
PTR_DEMANGLE (btowc_fct);
#endif
if (__builtin_expect (fcts->towc_nsteps == 1, 1)
&& __builtin_expect (btowc_fct != NULL, 1))
{
/* Use the shortcut function. */
return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c));
provides a reasonably straightforward way for bypassing pointer
mangling, simply by setting __shlib_handle to NULL.
I'll try to come up with a different fix.
Florian