]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r300775:
authored <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 25 Jun 2016 10:08:04 +0000 (10:08 +0000)
committered <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 25 Jun 2016 10:08:04 +0000 (10:08 +0000)
commitfcb6a0b280f68a93e9bef45dcf2a897eea663331
treee58704f5e46c6f4449b093fa2ec83c9039deebf2
parent0606b9cdfe2524e9e8c5ef72ad27e0a7519f053a
MFC r300775:

  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>.

git-svn-id: svn://svn.freebsd.org/base/stable/10@302193 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/stdlib/l64a.c