* src/lib/evil_stdlib.c:

manage correctly getenv() when value is NULL.



SVN revision: 39900
This commit is contained in:
Vincent Torri 2009-04-08 17:22:12 +00:00
parent df60ff6129
commit adf3a95ddc
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-04-08 Vincent Torri <doursse at users dot sf dot net>
* src/lib/evil_stdlib.c:
manage correctly getenv() when value is NULL.
2009-02-22 Vincent Torri <doursse at users dot sf dot net>
* src/lib/evil_main.c:

View File

@ -152,7 +152,8 @@ setenv(const char *name,
if (!overwrite && old_name)
return 0;
length = strlen(name) + strlen(value) + 2;
length = value ? strlen(value) : 0;
length += strlen(name) + 2;
str = (char *)malloc(length);
if (!str)
{