File: 02-openssl.patch

package info (click to toggle)
iperf3 3.19.1-2
  • links: PTS
  • area: main
  • in suites: sid
  • size: 3,152 kB
  • sloc: ansic: 14,897; sh: 5,300; makefile: 243; python: 134
file content (19 lines) | stat: -rw-r--r-- 888 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Resolve issue with openssl 3.5.3 encrypt #1956
 Set output buffer size prior to encrypt operation
 When calling EVP_PKEY_encrypt with a non-null output buffer,
 the output buffer length must be provided. Attempts to write
 beyond this length will fail.
Author: Michael Lowman (GitHub)
Forwarded: yes
Index: iperf3-3.19.1/src/iperf_auth.c
===================================================================
--- iperf3-3.19.1.orig/src/iperf_auth.c	2025-07-25 21:50:36.000000000 +0200
+++ iperf3-3.19.1/src/iperf_auth.c	2025-11-09 09:28:11.404817901 +0100
@@ -252,6 +252,7 @@
 #endif
     rsa_buffer  = OPENSSL_malloc(keysize * 2);
     *encryptedtext = (unsigned char*)OPENSSL_malloc(keysize);
+    encryptedtext_len = keysize;
 
     BIO *bioBuff   = BIO_new_mem_buf((void*)plaintext, (int)strlen(plaintext));
     rsa_buffer_len = BIO_read(bioBuff, rsa_buffer, keysize * 2);