Bug 472941 - Crashes when doing unsetenv() with empty env
Summary: Crashes when doing unsetenv() with empty env
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 10
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-25 18:34 UTC by Bastien Nocera
Modified: 2008-12-10 04:37 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-12-10 04:37:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bastien Nocera 2008-11-25 18:34:42 UTC
glibc-2.9-2.x86_64

This crashes inside the glibc:
#include <stdlib.h>

int main (int argc, char **argv)
{
      clearenv ();
      unsetenv("FOO");
      return 0;
}

==14998== Invalid read of size 4
==14998==    at 0xB3A53F: unsetenv (setenv.c:295)
==14998==    by 0x4008326: unsetenv (mc_replace_strmem.c:760)
==14998==    by 0x8048415: main (env.c:6)
==14998==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Comment 1 Ulrich Drepper 2008-12-02 01:41:21 UTC
Patch checked in upstream.

Comment 2 Jakub Jelinek 2008-12-08 14:52:42 UTC
Please try http://kojipkgs.fedoraproject.org/packages/glibc/2.9/3/

Comment 3 Fedora Update System 2008-12-08 20:34:53 UTC
glibc-2.9-3 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/glibc-2.9-3

Comment 4 Fedora Update System 2008-12-10 04:36:55 UTC
glibc-2.9-3 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.