From 296ffc45c3a3e389fb816cad2d2e4e23bc045212 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 12 Nov 2025 11:27:36 +0100 Subject: [PATCH] schannel: replace atoi() with curlx_str_number() The last atoi() call removed from libcurl Closes #19483 --- lib/vtls/schannel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 639d6c3842..863524e4ee 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -2587,9 +2587,12 @@ static int schannel_init(void) #pragma clang diagnostic pop #endif if(p_wine_get_version) { /* WINE detected */ + curl_off_t ver = 0; const char *wine_version = p_wine_get_version(); /* e.g. "6.0.2" */ /* Assume ALPN support with WINE 6.0 or upper */ - s_win_has_alpn = wine_version && atoi(wine_version) >= 6; + if(wine_version) + curlx_str_number(&wine_version, &ver, 20); + s_win_has_alpn = (ver >= 6); } else { /* ALPN is supported on Windows 8.1 / Server 2012 R2 and above. */