This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]