From patchwork Fri Mar 6 16:30:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4805 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7001:a68f:b0:83c:d90d:321 with SMTP id wf15csp1673527mab; Fri, 6 Mar 2026 08:30:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU+4Lrx8FH0a3Aqs7ogCtLe1FboPxGEjisjArC3m0Bx3H+m+PeLZS1CEPaPJv5YkFdqSKx5WOGf+s0=@openvpn.net X-Received: by 2002:a05:6871:3148:b0:40e:dfe2:4256 with SMTP id 586e51a60fabf-416e3f99ac4mr1622626fac.14.1772814628587; Fri, 06 Mar 2026 08:30:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772814628; cv=none; d=google.com; s=arc-20240605; b=GH4JGSfpPI+4Vxtkvl/xE5aqD7n/sMRz7PPHcAKY98FJYaa4QvNRTJHFdhEPo3saKV FVAjggLo6L60ch7wFnL8kX+MumDzp1WqdyddE7WRAuEwl77jOy3inxnNc3TgrsNcQYp0 rurfdW2mV/MNZNTwgzIVYrEXl0O2RQjQz85b6FomYvYbB0CN+BWYA34E8M/kJPqKbcKl uY/vFHPanx4E609tXuIHnHgl3WljRdH+qca49If4esEywEdSXkobiIMus+3QolGMXj2y wvdf7Qu2yprTyYys1APjUHqye7TC81CDYOspUKdzbHiu2xkTr1E4vW78V1MsU/r2INCl 6l8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding: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; bh=ETblRzNJWr+bQWPEeqGyXZF0o9nErKcH5wkbq4Bryq8=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=ddFZFsl1zVFY3QfgyBYBfZIwSmwLAP6oWnzNMu9aYgz9lDN5ah5moQ8Qm3sSseZ7Tj 28BA9kBW1XzgoxdIji5L6nq6wVwnw/IEaVHeoJahz2XDKqs7kMSesQn1Q19MTP0nUm3M 5pWPpggjH9GOJxeSyjHYHKMZ8jQv9qHsdXZ5E94sc9S13JKcicx1LwvhMCGFzuOTpXtC ipBO2gUMJ8+oDeLhdGXDaxw/yYV9VPRNvI/7K/g1EISzZzq42VUDKcRafWrqifiIREqQ EJ3cHTg52bIxCiWupR7lroWS7ARxdn2IHZJtkIzg3IDnDmv40nwVCp3xqfLM3v580eit 7V5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=NL0L72iY; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=mR7DVZb8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Jti64lnc; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-416e680efb3si1620009fac.250.2026.03.06.08.30.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2026 08:30:28 -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=NL0L72iY; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=mR7DVZb8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Jti64lnc; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de 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: 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:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ETblRzNJWr+bQWPEeqGyXZF0o9nErKcH5wkbq4Bryq8=; b=NL0L72iYC0cVFIH0J+Koi7dkEB uIxbkQFuRw+tOe2kgOA8cg3+S+KIwIOE/n3eFJ26BFwHQI4ZQPuQqJ8wpSRLMignMaFimLqpLFwsd NOH0Qf4osdey03qLwWQCvBWU6T1jJvASMjbLnasLcgUYj4jvr8hcEFBMJqiV0D79cJPg=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vyY4G-0004sf-JV; Fri, 06 Mar 2026 16:30:24 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vyY4F-0004sV-Be for openvpn-devel@lists.sourceforge.net; Fri, 06 Mar 2026 16:30:23 +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:To:From:Sender:Reply-To:Cc: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=jqr4Pd58l3cFHOwh7qVomPvodgQHYpUaOT9qZzu/GkI=; b=mR7DVZb8rxDSybNJhJDZBlPKxJ DkmkvpMsGvlxvaXo9qFXJa60+LYHuBcFVSy+b9aCu6eJ5OD9Tcl8yqIy3zmXCaYAqzf19SEZOxO8P vzJuU0/1tUpOTIutM0qNqoSBJe+KD9sFaVPsIDI20fcJoTGXa8NsSlRqHWEDseQu9UDA=; 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:To:From:Sender:Reply-To:Cc: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=jqr4Pd58l3cFHOwh7qVomPvodgQHYpUaOT9qZzu/GkI=; b=Jti64lncwdK9pNCxzk9902MyiL Gehem1DdnbxJCCFy+mzThgcgHFtt0FvO9dZaT2DhNXbHFywmYUaOq/xKvsCUfmmWclW2TTE8+d5qr xXR3fJpCjU31nJZ3RP8sdWGjV2/JDJG2NUBBpk7Zl88TlZgQVHMWLqdeIYLC9myEFTLA=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vyY4E-0005xK-Bv for openvpn-devel@lists.sourceforge.net; Fri, 06 Mar 2026 16:30:23 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 626GUAAe002450 for ; Fri, 6 Mar 2026 17:30:10 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 626GUAkB002449 for openvpn-devel@lists.sourceforge.net; Fri, 6 Mar 2026 17:30:10 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 6 Mar 2026 17:30:04 +0100 Message-ID: <20260306163010.2437-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.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: From: Frank Lichtenheld We already checked that this isn't negative so just use a cast. Change-Id: Ibc7a6d8c61b9e584bf5d2d13fb5072b7a28fc53b Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/open [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1vyY4E-0005xK-Bv Subject: [Openvpn-devel] [PATCH v3] tls_crypt: Avoid a sign-compare warning 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1858930872116847559?= X-GMAIL-MSGID: =?utf-8?q?1858930872116847559?= From: Frank Lichtenheld We already checked that this isn't negative so just use a cast. Change-Id: Ibc7a6d8c61b9e584bf5d2d13fb5072b7a28fc53b Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1524 --- 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/+/1524 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c index c2b6268..70889dc 100644 --- a/src/openvpn/tls_crypt.c +++ b/src/openvpn/tls_crypt.c @@ -206,11 +206,6 @@ return false; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - bool tls_crypt_unwrap(const struct buffer *src, struct buffer *dst, struct crypto_options *opt) { @@ -728,7 +723,7 @@ msg(M_FATAL, "ERROR: failed to base64 decode provided metadata"); goto cleanup; } - if (decoded_len > TLS_CRYPT_V2_MAX_METADATA_LEN - 1) + if ((unsigned int)decoded_len > TLS_CRYPT_V2_MAX_METADATA_LEN - 1) { msg(M_FATAL, "ERROR: metadata too long (%d bytes, max %u bytes)", decoded_len, TLS_CRYPT_V2_MAX_METADATA_LEN - 1); @@ -801,7 +796,3 @@ gc_free(&gc); } - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif