From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 24 01:40:01 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85656A32 for ; Wed, 24 Oct 2012 01:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3068FC12 for ; Wed, 24 Oct 2012 01:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9O1e1l7056377 for ; Wed, 24 Oct 2012 01:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9O1e1DZ056376; Wed, 24 Oct 2012 01:40:01 GMT (envelope-from gnats) Resent-Date: Wed, 24 Oct 2012 01:40:01 GMT Resent-Message-Id: <201210240140.q9O1e1DZ056376@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Zhihao Yuan Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC90A9F2 for ; Wed, 24 Oct 2012 01:35:45 +0000 (UTC) (envelope-from lichray@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8D08FC0A for ; Wed, 24 Oct 2012 01:35:45 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so9914iea.13 for ; Tue, 23 Oct 2012 18:35:39 -0700 (PDT) Received: by 10.50.179.36 with SMTP id dd4mr895852igc.64.1351042067108; Tue, 23 Oct 2012 18:27:47 -0700 (PDT) Received: from localhost (mb25036d0.tmodns.net. [208.54.80.178]) by mx.google.com with ESMTPS id vq4sm824754igb.10.2012.10.23.18.27.44 (version=SSLv3 cipher=OTHER); Tue, 23 Oct 2012 18:27:46 -0700 (PDT) Message-Id: <50874412.c49a320a.2c63.2c5e@mx.google.com> Date: Tue, 23 Oct 2012 18:27:46 -0700 (PDT) From: Zhihao Yuan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/173008: catopen(3) uninitialized value in failed entries. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Zhihao Yuan List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 01:40:01 -0000 >Number: 173008 >Category: bin >Synopsis: catopen(3) uninitialized value in failed entries. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 24 01:40:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Zhihao Yuan >Release: FreeBSD 8.3-STABLE amd64 >Organization: Northern Illinois University >Environment: System: FreeBSD elitebook.hp 8.3-STABLE FreeBSD 8.3-STABLE #4 r240363: Tue Sep 11 10:40:15 CDT 2012 lichray@elitebook.hp:/usr/obj/usr/src/sys/HOUKAGO amd64 >Description: np->catd will be tested on line 340, but failed entries have uninitialized .catd. Invalid read under valgrind. BTW: Please take a look at standards/172805 also. I suggested some other changes relating to this module there. >How-To-Repeat: >Fix: --- catclose_uinit.patch begins here --- diff --git lib/libc/nls/msgcat.c lib/libc/nls/msgcat.c index 44b1440..2859916 100644 --- lib/libc/nls/msgcat.c +++ lib/libc/nls/msgcat.c @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); if (np != NULL) { \ np->name = strdup(n); \ np->path = NULL; \ + np->catd = NLERR; \ np->lang = (l == NULL) ? NULL : \ strdup(l); \ np->caterrno = e; \ --- catclose_uinit.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: