]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Don't error if s_client receives exactly BUFSIZZ data
authorMatt Caswell <matt@openssl.org>
Mon, 30 Oct 2023 16:53:30 +0000 (16:53 +0000)
committerHugo Landau <hlandau@openssl.org>
Wed, 1 Nov 2023 10:20:19 +0000 (10:20 +0000)
We should accept that many bytes without failing

Fixes #22551

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/22558)

apps/s_client.c

index 8a7650223cacdc2a6a43553eecbefd74c6261a1a..78a44755cb54fbe7f14eae756c8aee415263de96 100644 (file)
@@ -3798,7 +3798,7 @@ static void user_data_init(struct user_data_st *user_data, SSL *con, char *buf,
 
 static int user_data_add(struct user_data_st *user_data, size_t i)
 {
-    if (user_data->buflen != 0 || i > user_data->bufmax - 1)
+    if (user_data->buflen != 0 || i > user_data->bufmax)
         return 0;
 
     user_data->buflen = i;