This is the mail archive of the glibc-bugs@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]

[Bug locale/22025] New: iconv: Inconsistency between pointer mangling and NULL checks


https://sourceware.org/bugzilla/show_bug.cgi?id=22025

            Bug ID: 22025
           Summary: iconv: Inconsistency between pointer mangling and NULL
                    checks
           Product: glibc
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: locale
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

We have an old downstream patch which addresses inconsistencies between pointer
mangling and NULL checks in the gconv/iconv code.  The problem is caused by
checks like this:

      /* Call the init function.  */
      if (result->__init_fct != NULL)
        {
          __gconv_init_fct init_fct = result->__init_fct;
#ifdef PTR_DEMANGLE
          PTR_DEMANGLE (init_fct);
#endif

If the pointer guard happens to have the same bit pattern as init_fct, the NULL
check will incorrectly succeed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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