<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib/getenv.c, branch releng/13.1</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libc: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-25T17:12:48+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-25T17:12:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d915a14ef094c8dfc1a5aee70e135abfec01d0f1'/>
<id>d915a14ef094c8dfc1a5aee70e135abfec01d0f1</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor libc cleanup: let calloc(3) do the multiplication.</title>
<updated>2017-03-13T04:14:03+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-03-13T04:14:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e449183c703e9da775c3dd0e24e608e1fddf9ab5'/>
<id>e449183c703e9da775c3dd0e24e608e1fddf9ab5</id>
<content type='text'>
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>libc: provide some bounds-checking through reallocarray(3).</title>
<updated>2017-03-12T16:03:34+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-03-12T16:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9f36610f9ef53017afbc50520b999882958c402c'/>
<id>9f36610f9ef53017afbc50520b999882958c402c</id>
<content type='text'>
reallocarray(3) is a non portable extension that originated in OpenBSD.
Given that it is already in FreeBSD's libc it is useful for the cases
where reallocation involves a multiplication.

MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D9955
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
reallocarray(3) is a non portable extension that originated in OpenBSD.
Given that it is already in FreeBSD's libc it is useful for the cases
where reallocation involves a multiplication.

MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D9955
</pre>
</div>
</content>
</entry>
<entry>
<title>[fix to r253380] __setenv: be explicit about placing '=' after name</title>
<updated>2013-07-17T08:45:27+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2013-07-17T08:45:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=22423fd8a088278f8df815287bc7bed4e7b98a0d'/>
<id>22423fd8a088278f8df815287bc7bed4e7b98a0d</id>
<content type='text'>
This should a regression introduced in r253380 if malloc'ed memory
happens to have '=' at the right place.

Reported by:	ache
Pointyhat to:	me (avg)
MFC after:	1 day
X-MFC with:	r253380
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should a regression introduced in r253380 if malloc'ed memory
happens to have '=' at the right place.

Reported by:	ache
Pointyhat to:	me (avg)
MFC after:	1 day
X-MFC with:	r253380
</pre>
</div>
</content>
</entry>
<entry>
<title>libc: name passed into __setenv is not necessarily NUL-terminated</title>
<updated>2013-07-16T07:26:46+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2013-07-16T07:26:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e488ee55bc4bbdd77872b4b4ce7fe69eccc4795a'/>
<id>e488ee55bc4bbdd77872b4b4ce7fe69eccc4795a</id>
<content type='text'>
That's particularly true when __setenv is called from __merge_environ.

MFC after:	4 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That's particularly true when __setenv is called from __merge_environ.

MFC after:	4 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize prev. commit for speed.</title>
<updated>2012-10-03T04:46:58+00:00</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2012-10-03T04:46:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=542e13498f48e0a3d443b63d5b0d4c0c54d5828c'/>
<id>542e13498f48e0a3d443b63d5b0d4c0c54d5828c</id>
<content type='text'>
1) Don't iterate the loop from the environment array beginning each time,
iterate it under the last place we deactivate instead.
2) Call __rebuild_environ() not on each iteration but once, only at the end
of whole loop (of course, only in case if something is changed).

MFC after:      1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) Don't iterate the loop from the environment array beginning each time,
iterate it under the last place we deactivate instead.
2) Call __rebuild_environ() not on each iteration but once, only at the end
of whole loop (of course, only in case if something is changed).

MFC after:      1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Using putenv() and later direct pointer contents modification it is possibe</title>
<updated>2012-10-02T17:44:08+00:00</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2012-10-02T17:44:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2de80aea8057d2b314eab5ba1d0c782ea1bb1b3a'/>
<id>2de80aea8057d2b314eab5ba1d0c782ea1bb1b3a</id>
<content type='text'>
to craft environment variables with similar names like that:
a=1
a=2
...
unsetenv("a") should remove them all to make later getenv("a") impossible.
Fix it to do so (this is GNU autoconf test #3 failure too).

PR:             172273
MFC after:      1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to craft environment variables with similar names like that:
a=1
a=2
...
unsetenv("a") should remove them all to make later getenv("a") impossible.
Fix it to do so (this is GNU autoconf test #3 failure too).

PR:             172273
MFC after:      1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert behavior change to setenv(), unsetenv() and putenv() until a more</title>
<updated>2009-12-07T00:22:10+00:00</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2009-12-07T00:22:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f959b43fd02012ab6b7d51a07ffe23a95b69bbac'/>
<id>f959b43fd02012ab6b7d51a07ffe23a95b69bbac</id>
<content type='text'>
thorough security review has been completed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
thorough security review has been completed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the behavior of setenv(), putenv() and unsetenv() to continue parsing</title>
<updated>2009-12-06T23:27:24+00:00</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2009-12-06T23:27:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ca7520fe577a6a753fa470189341743ed2e12ebb'/>
<id>ca7520fe577a6a753fa470189341743ed2e12ebb</id>
<content type='text'>
instead of returning an error if a corrupt (not a "name=value" string) entry
in the environ array is detected when (re)-building the internal
environment.  This should prevent applications or libraries from
experiencing issues arising from the expectation that these calls will
complete even with corrupt entries.  The behavior is now as it was prior to
7.0.

Reviewed by:	jilles
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
instead of returning an error if a corrupt (not a "name=value" string) entry
in the environ array is detected when (re)-building the internal
environment.  This should prevent applications or libraries from
experiencing issues arising from the expectation that these calls will
complete even with corrupt entries.  The behavior is now as it was prior to
7.0.

Reviewed by:	jilles
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve the comment within getenv() explaining the search order it takes to</title>
<updated>2009-12-06T23:05:17+00:00</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2009-12-06T23:05:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6da7f71cd4a64231b4fa027614553f491c14e1e2'/>
<id>6da7f71cd4a64231b4fa027614553f491c14e1e2</id>
<content type='text'>
find a variable.  Include a note that it must not cause the internal
environment to be generated since malloc() depends upon getenv().  To call
malloc() would create a circular dependency.

Recommended by:	green
Approved by:	jilles
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
find a variable.  Include a note that it must not cause the internal
environment to be generated since malloc() depends upon getenv().  To call
malloc() would create a circular dependency.

Recommended by:	green
Approved by:	jilles
MFC after:	1 week
</pre>
</div>
</content>
</entry>
</feed>
