base64: Stop decoding at the first sequence of pad characters
authorJouni Malinen <j@w1.fi>
Sun, 16 Oct 2011 09:36:21 +0000 (12:36 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 16 Oct 2011 09:36:21 +0000 (12:36 +0300)
commit619e6726baab7cfd505a971981383ef1013713a2
treef37441e8affb2dd1950c67ea602a7a64613bfe4f
parentc3b75919face9b40da5afdb31e950d455d54559d
base64: Stop decoding at the first sequence of pad characters

The base64 encoded data cannot included pad characters in the middle, so
we can stop the loop at the first sequence of pad characters. If the
sequence includes more than two pad characters, the encoding is invalid
and we can indicate failure.
src/utils/base64.c