From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6350 invoked by alias); 11 Oct 2014 09:08:59 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 6302 invoked by uid 48); 11 Oct 2014 09:08:55 -0000 From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/17477] New: __gconv_get_path crashes if GCONV_PATH set and no current directory Date: Sat, 11 Oct 2014 09:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.20 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_file_loc bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg00044.txt.bz2 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.