Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerate 0 byte input length for Update functions #8587

Closed
wants to merge 1 commit into from

Conversation

mattcaswell
Copy link
Member

@mattcaswell mattcaswell commented Mar 26, 2019

We treat that as automatic success. Other EVP_*Update functions already to
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.

IMO this should go to both master and 1.1.1

Fixes #8576

Checklist
  • documentation is added or updated
  • tests are added or updated

@mattcaswell mattcaswell added branch: master Merge to master branch branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch labels Mar 26, 2019
@kroeckx
Copy link
Member

kroeckx commented Mar 26, 2019

Type: to this -> do this

Copy link
Member

@t-j-h t-j-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct "mater" to "master" in the comment ... but otherwise approved once CIs complete.

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 openssl#8576
@mattcaswell
Copy link
Member Author

"mater" was a typo in github only not the commit message (corrected anyway). "to this"->"do this" typo fixed.

levitte pushed a commit that referenced this pull request Mar 27, 2019
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 #8587)

(cherry picked from commit a8274ea)
@mattcaswell
Copy link
Member Author

Pushed. Thanks.

levitte pushed a commit that referenced this pull request Mar 27, 2019
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 #8587)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLAKE2b_Update can pass NULL to memcpy (undefined behavior)
3 participants