diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2015-11-21 00:59:07 -0500 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2015-11-21 05:27:35 -0500 |
commit | 5c649375dd756dcd0b0c81a14a04cd8e87f198c1 (patch) | |
tree | 0203818748c0e33b61ea867c829cf2b8fff4c1d8 /ssl/s3_cbc.c | |
parent | 22a34c2fab39c38cac4a22a0e15ab9a1fd98f57c (diff) | |
download | openssl-new-5c649375dd756dcd0b0c81a14a04cd8e87f198c1.tar.gz |
Good hygiene with size_t output argument.
Though the callers check the function return value and ignore the
size_t output argument on failure, it is still often not ideal to
store (-1) in size_t on error. That might signal an unduly large
buffer. Instead set the size_t to 0, to indicate no space.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/s3_cbc.c')
-rw-r--r-- | ssl/s3_cbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index 5225222913..177f6d736f 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -278,7 +278,7 @@ int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, */ OPENSSL_assert(0); if (md_out_size) - *md_out_size = -1; + *md_out_size = 0; return 0; } |