This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly
- From: "tron at NetBSD dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sun, 14 Nov 2010 12:49:55 +0000
- Subject: [Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12218
Summary: getenv(3) handles variable names with equal signs
incorrectly
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: tron@NetBSD.org
Created attachment 5121
--> http://sourceware.org/bugzilla/attachment.cgi?id=5121
Program which demonstrates the bug in getenv(3)
getenv(3) doesn't check whether the variable name contains an equal sign (which
it shouldn't) and will therefore return an incorrect result as demonstrated by
the attached program:
getenv: getenv.c:11: main: Assertion `getenv("EVIL=VERY") == ((void *)0)'
failed.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.