split_send_fragment should always be less than or equal to max_send_fragment
authorMatt Caswell <matt@openssl.org>
Tue, 26 Apr 2016 17:01:24 +0000 (18:01 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 27 Apr 2016 08:22:40 +0000 (09:22 +0100)
A bug meant that SSL_CTRL_SET_MAX_SEND_FRAGMENT was not adjusting
split_send_fragment properly.

Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/ssl_lib.c

index 994d093..f93b98f 100644 (file)
@@ -1873,7 +1873,7 @@ long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
             return 0;
         ctx->max_send_fragment = larg;
         if (ctx->max_send_fragment < ctx->split_send_fragment)
-            ctx->split_send_fragment = ctx->split_send_fragment;
+            ctx->split_send_fragment = ctx->max_send_fragment;
         return 1;
     case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
         if ((unsigned int)larg > ctx->max_send_fragment || larg == 0)