Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2001 15:24:07 +0100 (CET)
From:      Hartmut Brandt <brandt@fokus.gmd.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/25308: namespace pollution in lmessages.c
Message-ID:  <200102231424.f1NEO7S43322@fokus.gmd.de>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102231424.f1NEO7S43322>