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:21:53 +0000 (23:21 +0100)
commit33c99f2c8169807660b46d49c3e735cfa09a6e0c
treec000d25f3bf8447c74945c09682edb2e541842ed
parent1a3701f4fe0530a40ec073cd78d02cfcc26c0f8e
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