Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e117c0f

Browse filesBrowse files
mhdawsonruyadorno
authored andcommitted
crypto: check return code from EVP_DigestUpdate
Coverity was complaining that we did not check the return code. We seem to check in the other place it is called and the method already handles returning a result. Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: #41800 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
1 parent 499171b commit e117c0f
Copy full SHA for e117c0f

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Collapse file

‎src/crypto/crypto_hash.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_hash.cc
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ bool Hash::HashInit(const EVP_MD* md, Maybe<unsigned int> xof_md_len) {
122122
bool Hash::HashUpdate(const char* data, size_t len) {
123123
if (!mdctx_)
124124
return false;
125-
EVP_DigestUpdate(mdctx_.get(), data, len);
126-
return true;
125+
return EVP_DigestUpdate(mdctx_.get(), data, len) == 1;
127126
}
128127

129128
void Hash::HashUpdate(const FunctionCallbackInfo<Value>& args) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.