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 libc/17477] New: __gconv_get_path crashes if GCONV_PATH set and no current directory


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

            Bug ID: 17477
           Summary: __gconv_get_path crashes if GCONV_PATH set and no
                    current directory
           Product: glibc
           Version: 2.20
               URL: https://bugzilla.redhat.com/show_bug.cgi?id=1151551
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
                CC: drepper.fsp at gmail dot com
             Flags: security-

In this piece of code, strlen should only be called if cwd is not NULL:

      /* Append the default path to the user-defined path.  */
      size_t user_len = strlen (__gconv_path_envvar);

      gconv_path_len = user_len + 1 + sizeof (default_gconv_path);
      gconv_path = alloca (gconv_path_len);
      __mempcpy (__mempcpy (__mempcpy (gconv_path, __gconv_path_envvar,
                       user_len),
                ":", 1),
             default_gconv_path, sizeof (default_gconv_path));
      cwd = __getcwd (NULL, 0);
      cwdlen = strlen (cwd);

-- 
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]