Could you please consider changing this line then: const size_t vallen = value != NULL ? strlen (value) + 1 : 0; to: const size_t vallen = strlen (value) + 1;
This is detecting that value is NULL, handling it, then causing a greater problem later on in the function. If value must be non NULL then a segmentation fault is preferable to a memory corruption which is much harded to diagnose. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/861132 Title: setenv ("NAME", NULL) corrupts environment To manage notifications about this bug go to: https://bugs.launchpad.net/eglibc/+bug/861132/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
