RT3757: base64 encoding bugs
authorEmilia Kasper <emilia@openssl.org>
Wed, 2 Sep 2015 13:31:28 +0000 (15:31 +0200)
committerEmilia Kasper <emilia@openssl.org>
Thu, 17 Sep 2015 18:15:41 +0000 (20:15 +0200)
commit76067c75fd60371c0a66a36ed531e52b883dcf6a
treed86782994dfa7bc71d3ea19f7e93a43784862819
parentf95d1af064bd0477cb551124bb3d7792c4e3216b
RT3757: base64 encoding bugs

Rewrite EVP_DecodeUpdate.

In particular: reject extra trailing padding, and padding in the middle
of the content. Don't limit line length. Add tests.

Previously, the behaviour was ill-defined, and depended on the position
of the padding within the input.

In addition, this appears to fix a possible two-byte oob read.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit 3cdd1e94b1d71f2ce3002738f9506da91fe2af45)
(cherry picked from commit 37faf117965de181f4de0b4032eecac2566de5f6)
CHANGES
crypto/evp/encode.c