From patchwork Thu Jan 22 12:58:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 4728 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:220f:b0:80a:3855:ce6a with SMTP id q15csp386922mag; Thu, 22 Jan 2026 04:58:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVGqHsTo8hK0BmmW8BJo4XseJLH0w4X/Cx6Pn7CZAq9oyBODWinsHbXEpiPM+qRGxksGYrRFmJXKxY=@openvpn.net X-Received: by 2002:a05:6870:c094:b0:3d3:740e:d5fd with SMTP id 586e51a60fabf-40846c830f5mr4480006fac.8.1769086727460; Thu, 22 Jan 2026 04:58:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769086727; cv=none; d=google.com; s=arc-20240605; b=cavE78S77+PNAOwA6aukwCVIue2TAD9xXrjg1D/Wzezm87UUvcIqcYeMueEjjlEMIr f0qoUdYVgLws17GDiHXi6d6LQgFomPsWKT8YDVy/q1oDDVJu4wvz6UQcRiI7tYiJlOP+ 19DXbkQzvadR0YS3WEfnZXbiE7Y/xwTrVh54fwLeOekAU6kLQJl/F81tDy9+N0P5W76U YC+UrIK199GB6kuBn4B5TIrz/kq2pMslt2uM3X5AfKfR4nrL4XJQmAt/k2wk2GRf1auy J70CHy1xdADVuoGXvmMfY6Mr8DBb3PG9sOARyL+aB8PfyiffLd6UR9kz3lKBoNlk0lEO MVDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=PCVYiH2Kdl/0eoOGrd31K2MCWUBU0NRayl0ptw/LPdA=; fh=CfxSpwd5kfiMJoL3kcov7PTxVKT7pGe/79idnx9XlBs=; b=dMNJKCt+aZ1z6ea8xEuptw/PR8oEeSCcih4/YCetEoXmTpiOprF1hHt0EoorlNyh0g I5Ff6x07yTi1l1OCCcpSY9KVhOtkBCtKnEHaTxF6cVGXL+yuLpjzJMZj5lU38bUt9dDk QY07k5i++Nnb0QC/7hOkQB3+dijw6ZjSOT5+YSVBvrzd7yOu94CkXjKrjjCRluAnvaKT wo8fTZQmXUASr5a/HQvpfQfp6Ygsj8BlwyGPfKNg/YoRdca80fC7cHuwFCEbOgb19S5D MbOqqMgnaVr4+QXhgYrnvb1KQCnGa7AWTYRZq/+Oc07kXEEEcD6g9UV7yM85YdbVdWH8 Vg4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=OXsNiW8P; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dB0SrBE8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FPBXTJD9; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=LW2CL4fR; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-4044bb8e069si14153454fac.103.2026.01.22.04.58.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2026 04:58:47 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=OXsNiW8P; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dB0SrBE8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FPBXTJD9; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=LW2CL4fR; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PCVYiH2Kdl/0eoOGrd31K2MCWUBU0NRayl0ptw/LPdA=; b=OXsNiW8PCpIAnCzl1P8PtLUW2M 21oow5oy9L4DjWlE2Krln2Z8v8gE5J5F/DxD9b19YWpCMnnppLUoQaPNiFJdyqQJdG+IPZ1BaoVkz kWoJ7aDvZ73KF1CnfTqre7oaIjdKnRdZ7fGHhTRQqyW4tmEuT0sIF4OnHng+hxMetXD8=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1viuGq-0006kh-GV; Thu, 22 Jan 2026 12:58:45 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1viuGp-0006kQ-7Z for openvpn-devel@lists.sourceforge.net; Thu, 22 Jan 2026 12:58:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ggWoyqIFydSDw+wznAzLYj8UBhN7JogeKammSAuxXLc=; b=dB0SrBE8Hv+VnoWPlKJOEv1eyw 0DXZz0rB6PXQu66+igOagbKEwTkt9aDucAS7z7J0Rwh7Msl6WxB/U8VyCKSM3CrWUxsUEqZiKNMuh MrX5LdB0uJ1cqyolp20B7zJxlINJqGm7f+KEF+KjwDdsPskzKgmK1CuEcN3gqUvBT6WU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ggWoyqIFydSDw+wznAzLYj8UBhN7JogeKammSAuxXLc=; b=FPBXTJD9h9hx+4VG6+z6qbUaji aoAvTjJ96FANME2Zb4FukFgfKWyPw9+P0tu95fawmZpBQjZE0PMPi9Dg2JbOyCEtWHHkaxf8bWog3 WWZJplCtuW/LhMB3Ec/m+Fi4WvGhc+alUR9nWOCFxV9vG1IrfUAHsY7S6EjBZyQiumMU=; Received: from mout-p-202.mailbox.org ([80.241.56.172]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1viuGp-0007JI-Bm for openvpn-devel@lists.sourceforge.net; Thu, 22 Jan 2026 12:58:43 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4dxh2G0LF4z9tlc; Thu, 22 Jan 2026 13:58:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1769086710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ggWoyqIFydSDw+wznAzLYj8UBhN7JogeKammSAuxXLc=; b=LW2CL4fRaEfTf2Mi+4cT1VDLQLqw5F+EZrwQOKiSeHCLcXRaEaN4E4l/mMbaP0rIAToLHw Ud38o/ZXhlkd+o142nTaXyxFjoISsKAbkptJFbUTUvwkJY0FVgqsV52u93XlQm27Bl96T2 CvMNxKY6FCeXtFG+5CAB/iQzyN80kl0e9uZKJXHh3dmFlA7XoBce+yUaH0eUOEuYQXLy+/ um5Wjy0GycWaKpi+vyeb5rhlWCyuwNZmsX+F9YqzAIRIOMjqXN1aeNkZV+8cXq9QTpso0X 7gffWNeqjKZIqOnt1O1tLHRVRcSZiVWroBHTm/Md66e/Ve2BzvLL6kPcr81p4g== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of frank@lichtenheld.com designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=frank@lichtenheld.com From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Thu, 22 Jan 2026 13:58:28 +0100 Message-ID: <20260122125829.108470-1-frank@lichtenheld.com> In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4dxh2G0LF4z9tlc X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Change-Id: I380e842b7429060d13bc0264e55fa5c06ab427df Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Gerrit URL: https://gerrit.openvpn.net/c [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.241.56.172 listed in wl.mailspike.net] X-Headers-End: 1viuGp-0007JI-Bm Subject: [Openvpn-devel] [PATCH v1] ssl_ncp: Avoid conversion warning in replace_default_in_ncp_ciphers_option X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arne Schwabe Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1855021884245938873?= X-GMAIL-MSGID: =?utf-8?q?1855021884245938873?= Change-Id: I380e842b7429060d13bc0264e55fa5c06ab427df Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1452 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1452 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/ssl_ncp.c b/src/openvpn/ssl_ncp.c index d4519b0..06262fe 100644 --- a/src/openvpn/ssl_ncp.c +++ b/src/openvpn/ssl_ncp.c @@ -534,11 +534,6 @@ } } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - /** * Replaces the string DEFAULT with the string \c replace. * @@ -549,12 +544,13 @@ replace_default_in_ncp_ciphers_option(struct options *o, const char *replace) { const char *search = "DEFAULT"; - const int ncp_ciphers_len = strlen(o->ncp_ciphers) + strlen(replace) - strlen(search) + 1; + const size_t ncp_ciphers_len = strlen(o->ncp_ciphers) + strlen(replace) - strlen(search) + 1; uint8_t *ncp_ciphers = gc_malloc(ncp_ciphers_len, true, &o->gc); struct buffer ncp_ciphers_buf; - buf_set_write(&ncp_ciphers_buf, ncp_ciphers, ncp_ciphers_len); + ASSERT(ncp_ciphers_len <= INT_MAX); + buf_set_write(&ncp_ciphers_buf, ncp_ciphers, (int)ncp_ciphers_len); const char *def = strstr(o->ncp_ciphers, search); @@ -571,10 +567,6 @@ o->ncp_ciphers = (char *)ncp_ciphers; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - /** * Checks for availibility of Chacha20-Poly1305 and sets * the ncp_cipher to either AES-256-GCM:AES-128-GCM or