The branch OpenSSL_1_0_2-stable has been updated
       via  03bf7127808e3a8fbdddda42763458d5da14127e (commit)
      from  56d913467541506572f908a34c32ca7071f77a94 (commit)


- Log -----------------------------------------------------------------
commit 03bf7127808e3a8fbdddda42763458d5da14127e
Author: Viktor Dukhovni <[email protected]>
Date:   Sat Nov 21 00:59:07 2015 -0500

    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 <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 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 f3aa878..557622f 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;
     }
 
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to