From: Matt Caswell Date: Mon, 7 Mar 2016 10:06:42 +0000 (+0000) Subject: Fix s_server/s_client handling of the split_send_frag argument X-Git-Tag: OpenSSL_1_1_0-pre4~275 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e2d5183d7cd5479d7c63ba524b3ddc4abd707dba;p=oweals%2Fopenssl.git Fix s_server/s_client handling of the split_send_frag argument Ensure that a value of 0 is correctly handled for the split_send_frag argument. Reviewed-by: Tim Hudson --- diff --git a/apps/s_client.c b/apps/s_client.c index 5a5a90b1cb..a1ef64b13f 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -1389,8 +1389,11 @@ int s_client_main(int argc, char **argv) case OPT_SPLIT_SEND_FRAG: split_send_fragment = atoi(opt_arg()); if (split_send_fragment == 0) { - /* Not allowed - set to a deliberately bad value */ - split_send_fragment = -1; + /* + * Not allowed - set to a deliberately bad value so we get an + * error message below + */ + split_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH + 1; } break; case OPT_MAX_PIPELINES: diff --git a/apps/s_server.c b/apps/s_server.c index 870c7b24f9..35a22f7900 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -1517,8 +1517,11 @@ int s_server_main(int argc, char *argv[]) case OPT_SPLIT_SEND_FRAG: split_send_fragment = atoi(opt_arg()); if (split_send_fragment == 0) { - /* Not allowed - set to a deliberately bad value */ - split_send_fragment = -1; + /* + * Not allowed - set to a deliberately bad value so we get an + * error message below + */ + split_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH + 1; } break; case OPT_MAX_PIPELINES: