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:12:39 +0000 (23:12 +0100)
commitb86d7dca69f5c80abd60896c8ed3039fc56210cc
treec45dda461606988b1bd9fc150f5635650378009c
parentc8269881093324b881b81472be037055571f73f3
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>
crypto/evp/encode.c