HomeFreeBSD

Let l64a() properly null terminate its result.

Description

Let l64a() properly null terminate its result.

Though the buffer used by l64a() is initialized with null bytes,
repetetive calls may end up having trailing garbage of previous
invocations because we don't end up terminating the string.

Instead of importing NetBSD's fix, use this opportunity to simplify this
function dramatically, for example by just storing the Base64 character
set in a string. There is also no need to do the bitmasking, as we can
just use the proper integer type from <stdint.h>.

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D6511

Details

Provenance
edAuthored on
Differential Revision
D6511: Let l64a() properly null terminate its result.
Parents
rS300774: Ifndef KERNEL the userspace-only routines in sys/md[45].h
Branches
Unknown
Tags
Unknown