From 03bf7127808e3a8fbdddda42763458d5da14127e Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Sat, 21 Nov 2015 00:59:07 -0500 Subject: [PATCH] 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 a 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 --- ssl/s3_cbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index f3aa8781e2..557622f513 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -520,7 +520,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; } -- 2.25.1