<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libutil/tests, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-03-03T22:51:02Z</updated>
<entry>
<title>libutil: avoid an out-of-bounds read in trimdomain(3)</title>
<updated>2026-03-03T22:51:02Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2026-03-03T22:51:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f268f95955f5f0f91f4d39e13bcd69a24e0d8ce4'/>
<id>urn:sha1:f268f95955f5f0f91f4d39e13bcd69a24e0d8ce4</id>
<content type='text'>
memchr(3) will happily believe we've passed in a valid object, but
hostsize could easily exceed the bounds of fullhost.  Clamp it down to
the string size to be safe and avoid UB.  This plugs a potential
overread noted in the compat shim that was just added.

Reviewed by:	des
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D54623
</content>
</entry>
<entry>
<title>libutil: Fix 32-bit build</title>
<updated>2025-08-07T09:34:13Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-08-07T09:31:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bd953a6026fce63b0a76a01da1812e51f630f797'/>
<id>urn:sha1:bd953a6026fce63b0a76a01da1812e51f630f797</id>
<content type='text'>
In the expand_generic test case for expand_number(), leave out size_t
if it's not 64 bits wide.

Fixes:		ab1c6874e500
</content>
</entry>
<entry>
<title>libutil: Backward compatibility for expand_number()</title>
<updated>2025-08-06T20:43:13Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-08-06T20:34:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ab1c6874e5004a8ac4e6b077a4aee307e22628b1'/>
<id>urn:sha1:ab1c6874e5004a8ac4e6b077a4aee307e22628b1</id>
<content type='text'>
Reimplement expand_number() in terms of expand_unsigned(), which takes
a pointer to uint64_t like expand_number() did before.  Provide a macro
that picks the correct version based on the type of the argument.

Fixes:		2e0caa7c7e14
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D51723
</content>
</entry>
<entry>
<title>libutil: Better tests for expand_number(3)</title>
<updated>2025-08-02T14:05:44Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-08-02T14:05:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=301dee770efe9c520ac001add39b9180897aafbb'/>
<id>urn:sha1:301dee770efe9c520ac001add39b9180897aafbb</id>
<content type='text'>
Replace the current tests with jhb's earlier, more extensive proposal,
updated to take into account the switch back to signed integers.

Reviewed by:	pstef
Differential Revision:	https://reviews.freebsd.org/D20796
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>urn:sha1:e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>include: ssp: round out fortification of current set of headers</title>
<updated>2024-07-13T05:16:24Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-07-13T05:16:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cf8e5289a110954600f135024d1515a77d0ae34d'/>
<id>urn:sha1:cf8e5289a110954600f135024d1515a77d0ae34d</id>
<content type='text'>
ssp/ssp.h needed some improvements:
 - `len` isn't always a size_t, it may need casted
 - In some cases we may want to use a len that isn't specified as a
    parameter (e.g., L_ctermid), so __ssp_redirect() should be more
    flexible.
 - In other cases we may want additional checking, so pull all of the
    declaration bits out of __ssp_redirect_raw() so that some functions
    can implement the body themselves.

strlcat/strlcpy should be the last of the fortified functions that get
their own __*_chk symbols, and these cases are only done to be
consistent with the rest of the str*() set.

Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45679
</content>
</entry>
<entry>
<title>lib: Automated cleanup of cdefs and other formatting</title>
<updated>2023-11-27T05:23:59Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-24T20:12:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a2f733abcff64628b7771a47089628b7327a88bd'/>
<id>urn:sha1:a2f733abcff64628b7771a47089628b7327a88bd</id>
<content type='text'>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>forkpty: Avoid fd leak if fork() fails.</title>
<updated>2023-08-17T13:48:42Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2023-08-17T13:48:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a4aaee2120ce0a121f86e39e214c2fabe82f2762'/>
<id>urn:sha1:a4aaee2120ce0a121f86e39e214c2fabe82f2762</id>
<content type='text'>
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D41491
</content>
</entry>
<entry>
<title>Remove my middle name.</title>
<updated>2023-08-17T13:08:30Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2023-08-17T13:08:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e738085b94631f90e21a49852538ac95974baf44'/>
<id>urn:sha1:e738085b94631f90e21a49852538ac95974baf44</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>urn:sha1:d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
</entry>
</feed>
