Skip to content

Commit 7cf21a3

Browse files
committed
use_proxy(): Add missing terminating NUL byte
Fixes CVE-2025-9232 There is a missing terminating NUL byte after strncpy() call. Issue and a proposed fix reported by Stanislav Fort (Aisle Research). Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 6bca150)
1 parent cd6187c commit 7cf21a3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

crypto/http/http_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ static int use_proxy(const char *no_proxy, const char *server)
261261
/* strip leading '[' and trailing ']' from escaped IPv6 address */
262262
sl -= 2;
263263
strncpy(host, server + 1, sl);
264+
host[sl] = '\0';
264265
server = host;
265266
}
266267

0 commit comments

Comments
 (0)