]> granicus.if.org Git - apache/commit
util.c: add a strict Base64 decoding function
authorJacob Champion <jchampion@apache.org>
Tue, 20 Jun 2017 23:55:20 +0000 (23:55 +0000)
committerJacob Champion <jchampion@apache.org>
Tue, 20 Jun 2017 23:55:20 +0000 (23:55 +0000)
commite0852fd12e2ac4afc7540eb78840c4a11cfa2e29
tree4422e5f621b33d4a525ce9307ad855f535482623
parent78a4c3c46e741e1eb64899e6ee9fb913318791e1
util.c: add a strict Base64 decoding function

ap_pbase64decode_strict() adds to the functionality of
ap_pbase64decode() in two ways:

- the length of the decoded buffer is returned, allowing embedded NULLs
  to be retained by the caller
- the input string is strictly checked for Base64 validity, including
  correct zero-padding at the end of the string

(This was originally added to the httpdunit feature/backport branch in
r1796208, then reverted in r1799376, since it's currently intended for
trunk only.)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1799380 13f79535-47bb-0310-9956-ffa450edef68
include/httpd.h
server/util.c
test/unit/base64.c [new file with mode: 0644]