From: "cron2 (Code Review)" Date: Thu, 12 Mar 2026 07:44:17 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <53d1ac2b300ad014eec1dfd9d51b65b4f9a21706-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="PQYULxvQw0w="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: tls_crypt: Avoid a sign-compare warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --PQYULxvQw0w= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#5) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1524?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: tls_crypt: Avoid a sign-compare warning ...................................................................... tls_crypt: Avoid a sign-compare warning 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 Message-Id: <20260306163010.2437-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 959.html Signed-off-by: Gert Doering --- M src/openvpn/tls_crypt.c 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/24/1524/5 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 cryp= to_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 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1524?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ibc7a6d8c61b9e584bf5d2d13fb5072b7a28fc53b Gerrit-Change-Number: 1524 Gerrit-PatchSet: 5 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --PQYULxvQw0w= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #5 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2

tls_crypt: Avoid a sign-compare war=
ning

We already checked that this isn't negative
so just use = a cast.

Change-Id: Ibc7a6d8c61b9e584bf5d2d13fb5072b7a28fc53b
Sign= ed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doe= ring <gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/op= envpn/+/1524
Message-Id: <20260306163010.2437-1-gert@...1296...>URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg= 35959.html
Signed-off-by: Gert Doering <gert@...1296...>
---M src/openvpn/tls_crypt.c
1 file changed, 1 insertion(+), 10 deletions(= -)

git pull ssh://gerrit.openvpn.net:29418/openv=
pn refs/changes/24/1524/5
diff --git a/src/openvpn/tls_crypt.c b/sr=
c/openvpn/tls_crypt.c
index c2b6268..70889dc 100644<= br>--- a/src/openvpn/tls_crypt.c
+++ b/src/openvpn/tl= s_crypt.c
@@ -206,11 +206,6 @@
return = false;
}

-#if defined(__GNUC__) || defined(__clang__)-#pragma GCC diagnostic push
-#pragma GCC diagnostic ig= nored "-Wsign-compare"
-#endif
-
bool
tls_crypt_unwrap(const struct buffer *s= rc, struct buffer *dst, struct crypto_options *opt)
{
@@ -728,7 +723,7 @@
msg(M_FATAL, &= quot;ERROR: failed to base64 decode provided metadata");
goto cleanup;

}
- if (decoded_len > TLS_CRYPT_V= 2_MAX_METADATA_LEN - 1)
+ if ((unsigned int)decoded_len > TLS_CRYPT_V2_MAX_METADATA_LE= N - 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_f= ree(&gc);
}
-
-#if define= d(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif

To view, visit = change 1= 524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc7a6d8c61b9e584bf5d2d13fb5= 072b7a28fc53b
Gerrit-Change-Number: 1524
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --PQYULxvQw0w=--