EVP_*Update: ensure that input NULL with length 0 isn't passed
authorRichard Levitte <levitte@openssl.org>
Thu, 4 Apr 2019 23:22:14 +0000 (01:22 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 10 Apr 2019 05:52:55 +0000 (07:52 +0200)
commitdcb982d792d6064ed3493e79749208d8c257ff04
treea531e175c962be58c65cae7f9412415e54ba176f
parentccf453610f48fe88968f0cfc63784b503eae33a0
EVP_*Update: ensure that input NULL with length 0 isn't passed

Even with custome ciphers, the combination in == NULL && inl == 0
should not be passed down to the backend cipher function.  The reason
is that these are the values passed by EVP_*Final, and some of the
backend cipher functions do check for these to see if a "final" call
is made.

Fixes #8675

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8676)
crypto/evp/evp_enc.c