git: DragonFly_RELEASE_6_2 libc/net: Fix b64_pton() for some exact-sized buffer

2022-05-01 Thread Aaron LI


commit bdf470c4003cab60427283746458a1eddd6486e4
Author: Aaron LI 
Date:   Sat Apr 30 21:06:40 2022 +0800

libc/net: Fix b64_pton() for some exact-sized buffer

When decoding a base64 string with padding, b64_pton() can fail when the
output buffer is exactly the needed size.  For example, decoding the
following base64 string to buffer[32] would fail:

% dd if=/dev/random bs=32 count=1 | base64
FCiWkKuhdRq3tMmtAt9CpchTTYMlIW3U3gJsavDNxZI=

This commit fixes the above issue.

Reported-by: dczheng
Obtained-from: OpenBSD
See also: FreeBSD revision 275060, https://reviews.freebsd.org/D1218

Summary of changes:
 lib/libc/net/base64.c | 26 +-
 1 file changed, 17 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bdf470c4003cab60427283746458a1eddd6486e4


-- 
DragonFly BSD source repository


git: Add base64(3) man page for b64_ntop() and b64_pton()

2022-05-01 Thread Aaron LI


commit ea3dc9921401b579b2d0f2f0f8e226e392d468fb
Author: Aaron LI 
Date:   Sat Apr 30 22:22:20 2022 +0800

Add base64(3) man page for b64_ntop() and b64_pton()

Reviewed-and-improved-by: swildner

Summary of changes:
 lib/libc/net/Makefile.inc|   4 +-
 lib/libc/{sys/lwp_setname.2 => net/base64.3} | 119 ---
 2 files changed, 73 insertions(+), 50 deletions(-)
 copy lib/libc/{sys/lwp_setname.2 => net/base64.3} (53%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ea3dc9921401b579b2d0f2f0f8e226e392d468fb


-- 
DragonFly BSD source repository


git: libc/net: Fix b64_pton() for some exact-sized buffer

2022-05-01 Thread Aaron LI


commit 3bf574a91d98898f33673d3b78fb3fe581c3c4e7
Author: Aaron LI 
Date:   Sat Apr 30 21:06:40 2022 +0800

libc/net: Fix b64_pton() for some exact-sized buffer

When decoding a base64 string with padding, b64_pton() can fail when the
output buffer is exactly the needed size.  For example, decoding the
following base64 string to buffer[32] would fail:

% dd if=/dev/random bs=32 count=1 | base64
FCiWkKuhdRq3tMmtAt9CpchTTYMlIW3U3gJsavDNxZI=

This commit fixes the above issue.

Reported-by: dczheng
Obtained-from: OpenBSD
See also: FreeBSD revision 275060, https://reviews.freebsd.org/D1218

Summary of changes:
 lib/libc/net/base64.c | 27 +--
 1 file changed, 17 insertions(+), 10 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3bf574a91d98898f33673d3b78fb3fe581c3c4e7


-- 
DragonFly BSD source repository


git: libc/net: Multiple minor cleanups to base64.c

2022-05-01 Thread Aaron LI


commit fe2da4c891f6d5ab555eac0ac3edc3241c50c1c5
Author: Aaron LI 
Date:   Sat Apr 30 21:01:02 2022 +0800

libc/net: Multiple minor cleanups to base64.c

* Remove unused but included headers.
* Use 'unsigned char' instead of 'u_char'.
* Properly cast 'char' to 'unsigned char'.
* Remove the debug Assert()s.

Partially obtained from OpenBSD.

Summary of changes:
 lib/libc/net/base64.c | 58 ++-
 1 file changed, 25 insertions(+), 33 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fe2da4c891f6d5ab555eac0ac3edc3241c50c1c5


-- 
DragonFly BSD source repository


git: ifnet.9: Add missing whitespace.

2022-05-01 Thread Sascha Wildner


commit 7f0bee16e5b185c72b5efe261e267f490cc601ab
Author: Sascha Wildner 
Date:   Sun May 1 16:32:55 2022 +0200

ifnet.9: Add missing whitespace.

Summary of changes:
 share/man/man9/ifnet.9 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7f0bee16e5b185c72b5efe261e267f490cc601ab


-- 
DragonFly BSD source repository