Tolerate 0 byte input length for Update functions
authorMatt Caswell <matt@openssl.org>
Tue, 26 Mar 2019 15:25:15 +0000 (15:25 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 27 Mar 2019 10:20:52 +0000 (10:20 +0000)
commit9437fe0b01fee8dfd23303d66ad45c2f523a8f25
tree024ec89ef493bb7fe79f306f1ecd1fb873bd51a5
parentce283e1011d7b9e08a6c137d8d670ffc77cb2e3b
Tolerate 0 byte input length for Update functions

We treat that as automatic success. Other EVP_*Update functions already do
this (e.g. EVP_EncryptUpdate, EVP_DecryptUpdate etc). EVP_EncodeUpdate is
a bit of an anomoly. That treats 0 byte input length as an error.

Fixes #8576

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8587)

(cherry picked from commit a8274ea351988aa754cb9983b27d7059613ee11e)
crypto/evp/digest.c