Sanity check EVP_EncodeUpdate buffer len
authorMatt Caswell <matt@openssl.org>
Mon, 27 Apr 2015 10:13:56 +0000 (11:13 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 30 Apr 2015 22:26:07 +0000 (23:26 +0100)
commit951ede2a06eba9a71c5d40b25f924e97f443c437
tree04cb05eff7196059e7bae9c058c0aaecacd6d2ec
parent974d4d675cc6f3e1aa50b294ae12a5ba2acebd62
Sanity check EVP_EncodeUpdate buffer len

There was already a sanity check to ensure the passed buffer length is not
zero. Extend this to ensure that it also not negative. Thanks to Kevin
Wojtysiak (Int3 Solutions) and Paramjot Oberoi (Int3 Solutions) for
reporting this issue.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit b86d7dca69f5c80abd60896c8ed3039fc56210cc)
crypto/evp/encode.c