modp_b64: Handle overflow in Base64Encode

Cherry-pick changes on crrev.com/c/3909830.
libchrome will be using the macro MODP_B64_MAX_INPUT_LEN for r1050872
uprev.

BUG=None
TEST=emerge modp_b64 libchrome (r1050872)

Change-Id: I76e221a3c1b3be0c5d0bf3c237716e3f4170af50
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/external/modp_b64/+/3979129
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Auto-Submit: Grace Cham <hscham@chromium.org>
Tested-by: Grace Cham <hscham@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
1 file changed