Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2015-06-02 | Fix setenv.c diagnostic pragma to be compatible with GCC 4.6 | Roland McGrath | 1 | -1/+5 | |
2015-04-19 | Better fix for setenv (..., NULL, ...) | Paul Eggert | 1 | -1/+17 | |
* stdlib/setenv.c (__add_to_environ): Dump core quickly if setenv (..., NULL, ...) is called. This time, do it the right way, and pacify GCC with a pragma. | |||||
2015-03-15 | * stdlib/setenv.c (__add_to_environ): Revert previous change. | Paul Eggert | 1 | -9/+1 | |
2015-03-13 | * stdlib/setenv.c (__add_to_environ): | Paul Eggert | 1 | -1/+9 | |
Dump core quickly if setenv (..., NULL, ...) is called. | |||||
2015-01-07 | setenv fix memory leak when setting large, duplicate string (BZ #17658) | Eric Biggers | 1 | -0/+7 | |
glibc maintains a binary tree of environment strings it malloc()ed itself. However, it's possible for it to malloc() a string, then find that an identical string is already in the tree. In this case, the memory is leaked and is not freed if the application later calls __libc_freeres(). Fix this by freeing 'new_value' when it's unneeded. Test case: #include <stdlib.h> #include <string.h> int main() { char *p = calloc(100000, 1); memset(p, 'A', 99999); setenv("TESTVAR", p, 1); setenv("TESTVAR", p, 1); free(p); } Leak that was reported by valgrind: 100,008 bytes in 1 blocks are definitely lost in loss record 1 of 1 at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E6B3D4: __add_to_environ (setenv.c:176) by 0x4C31B8F: setenv (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x400642: main (in /mnt/tmpfs/a.out) | |||||
2015-01-02 | Update copyright dates with scripts/update-copyrights. | Joseph Myers | 1 | -1/+1 | |
2014-02-11 | Remove unused variable from stdlib/setenv.c | Ondřej Bílka | 1 | -1/+0 | |
2014-02-10 | Use glibc_likely instead __builtin_expect. | Ondřej Bílka | 1 | -3/+3 | |
2014-02-10 | Fix previous commit. | Ondřej Bílka | 1 | -0/+5 | |
2014-02-10 | Deduplicate setenv. | Ondřej Bílka | 1 | -72/+3 | |
Setenv contained a code path that was redundant as it could be handled in general case. | |||||
2014-01-01 | Update copyright notices with scripts/update-copyrights | Allan McRae | 1 | -1/+1 | |
2013-06-08 | Use (void) in no-arguments function definitions. | Joseph Myers | 1 | -1/+1 | |
2013-06-07 | Avoid use of "register" as optimization hint. | Joseph Myers | 1 | -2/+2 | |
2013-01-02 | Update copyright notices with scripts/update-copyrights. | Joseph Myers | 1 | -1/+1 | |
2012-02-09 | Replace FSF snail mail address with URLs. | Paul Eggert | 1 | -3/+2 | |
2010-02-02 | Avoid alloca in setenv for long strings. | Ulrich Drepper | 1 | -30/+64 | |
2008-12-02 | * stdlib/setenv.c (unsetenv): Don't search environment if it does | Ulrich Drepper | 1 | -14/+15 | |
not exist. | |||||
2005-12-14 | Moved to csu/errno-loc.c. | Ulrich Drepper | 1 | -0/+353 | |
2004-12-22 | (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. | Ulrich Drepper | 1 | -353/+0 | |
2007-07-12 | 2.5-18.1 | Jakub Jelinek | 1 | -0/+353 | |