From owner-freebsd-bugs Fri Feb 23 6:30:11 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C453D37B65D for ; Fri, 23 Feb 2001 06:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1NEU1a96343; Fri, 23 Feb 2001 06:30:01 -0800 (PST) (envelope-from gnats) Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by hub.freebsd.org (Postfix) with ESMTP id 6BFB937B401 for ; Fri, 23 Feb 2001 06:24:08 -0800 (PST) (envelope-from brandt@fokus.gmd.de) Received: from fokus.gmd.de (beagle [193.175.132.100]) by mailhub.fokus.gmd.de (8.8.8/8.8.8) with ESMTP id PAA23211 for ; Fri, 23 Feb 2001 15:24:07 +0100 (MET) Received: (from hbb@localhost) by fokus.gmd.de (8.11.2/8.11.0) id f1NEO7S43322; Fri, 23 Feb 2001 15:24:07 +0100 (CET) (envelope-from hbb) Message-Id: <200102231424.f1NEO7S43322@fokus.gmd.de> Date: Fri, 23 Feb 2001 15:24:07 +0100 (CET) From: Hartmut Brandt Reply-To: brandt@fokus.gmd.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/25308: namespace pollution in lmessages.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25308 >Category: bin >Synopsis: libc/locale/lmessages.c declares a global variable 'empty' >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 23 06:30:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: brandt@fokus.gmd.de >Release: FreeBSD 5.0-CURRENT i386 >Organization: GMD Fokus >Environment: System: FreeBSD beagle.fokus.gmd.de 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Thu Feb 22 14:07:18 CET 2001 hbb@beagle.fokus.gmd.de:/opt/obj/usr/src/sys/BEAGLE i386 >Description: libc/locale/lmessages.c contains the following definition: char empty[] = ""; This is a serious namespace pollution. Probably a 'static' is missing. >How-To-Repeat: Link a program which contains a symbol 'empty' and watch the linker to complain. >Fix: --- lmessages.c.orig Fri Feb 23 15:06:44 2001 +++ lmessages.c Fri Feb 23 15:06:54 2001 @@ -35,7 +35,7 @@ #define LCMESSAGES_SIZE_MIN \ (offsetof(struct lc_messages_T, yesstr) / sizeof(char *)) -char empty[] = ""; +static char empty[] = ""; static const struct lc_messages_T _C_messages_locale = { "^[yY]" , /* yesexpr */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message