Skip to content

Commit

Permalink
Update return value from EVP_Encode_Update in one error case (#1499)
Browse files Browse the repository at this point in the history
Coverity pointed that total was not used in this `if` statement which
returns right away. It was because of introducing the return statements
in
6d9a767.
The comments indicate that the intention is to update out_len as on line
180.
  • Loading branch information
nebeid authored Mar 15, 2024
1 parent e248bf5 commit edfbcb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/base64/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, uint8_t *out, int *out_len,
if (total > INT_MAX) {
// We cannot signal an error, but we can at least avoid making *out_len
// negative.
total = 0;
*out_len = 0;
return 0;
}
*out_len = (int)total;
Expand Down

0 comments on commit edfbcb9

Please sign in to comment.