From patchwork Sat Mar 7 09:16:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4810 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:1e24:b0:83c:d90d:321 with SMTP id ht36csp128247mab; Sat, 7 Mar 2026 01:17:09 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXzUnjJt4nw3d8S+KgsnFq9QXaNmAOTfnfSBLWwBuLeiz/n/heX39PsmTGv2vJFN6uxWeVknb6tI08=@openvpn.net X-Received: by 2002:a05:6820:602:b0:67a:4fe9:a4ab with SMTP id 006d021491bc7-67b9bd10ed9mr2995050eaf.40.1772875028995; Sat, 07 Mar 2026 01:17:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772875028; cv=none; d=google.com; s=arc-20240605; b=bKfoAttWU4ZoEak5D3Ron0RLTpcFECMGC6+7OB9M6owAasBwhBb3PwulcguzssXelz w0j0Rz8o0skvBYaNODpNtigFqN3D87tjHqO+Bx6AMUuPpG8sPnzjwR9IwotVVbKRyy0m wQnW+VIFMwX4Wr6joDH5ZQtZ3KWro0GT5JaItRrRl5RNirNh/w09ozAqADsbNpWtqkI7 9P/oLQQJs8woMkET/DVnp9zYRbJ6K6N/JuWo4F9R2YVlkx+XEqsB3VnzV3bOCrqFU67Q N+y9REEJpEWGQ3rKxzm6Rt6cdAwdbpbx3gTC1+zaS4i4SXumq9mM+tpczCzixjiVOSp8 R/Vg== 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=K8EtZmApzH0+nnBjvce6k4k0Xywl1N+JabdpS1L+fQA=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=ODYU262hhSok5lfOS+tFEn6tIqzxzeN346oMu+MfuNrO+eDMv9d/WX0A7R/7lHoBVq A1VIzPHQOrv7foC7taDqUUyJves8inMbueSnAddg3FaM8qofgviZTH2AAOD1icdfBHgJ stsqt6alUT8Wpdk2+hx5tE2ttQGYCd3hhZrLnvxLyeO+uNOCBjD+66EQzXmGnZCEAvT7 BjACOYSYi+nTLSNS0K2UyparxBf2tnk3WT+oftEjxYZ257YRhaakGGUKiOegp+1yT6MI vk7iaSdxZIShBOHuUwNDQM0TLB/hSpPEgfD58kDUsejVLhVytRlKrXySNAIOQ/nVxe2O pDpQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=TV0lRSce; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Z1sgJzFm; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=LXK8vW9g; 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-416e6876f6esi3030530fac.319.2026.03.07.01.17.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Mar 2026 01:17:08 -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=TV0lRSce; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Z1sgJzFm; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=LXK8vW9g; 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=K8EtZmApzH0+nnBjvce6k4k0Xywl1N+JabdpS1L+fQA=; b=TV0lRSceJQUB43hdATUznFjyVt XGJrikv+579LmssUNyCcC0uVWtU251HmbZs5fPlvSjFAGApVyFnbU6IjvOgzG8JDi6QS2plXWwsM4 j1FsbBRbo3qFzbbekb66Q9gLRXrG6OnsMmMVzCeD0be9gzSVI5lH1VtY6uAj3sT0rxPo=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vynmV-0006LS-AW; Sat, 07 Mar 2026 09:17:07 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vynmT-0006LM-Gz for openvpn-devel@lists.sourceforge.net; Sat, 07 Mar 2026 09:17:05 +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=lT5JVB05neE1L7cN+dvf4Jt8pwVJUrpZgBtvypgyf/4=; b=Z1sgJzFmKMOKR3WlqpOp/xXp0k 32DJ2b1MTHdrb1vZpGXUoeKzE9Gg+SbMo7k5vZ3QmpWF4qXfPgvJdGyqkESvlA/CLgAYr33isIlnh yXKtIHFlCdcwAPLGpyUf+oQxV+jTJ99JRGbBjP0kGhNoJZrCtOm4p5Y0TxL5zgRBoO6k=; 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=lT5JVB05neE1L7cN+dvf4Jt8pwVJUrpZgBtvypgyf/4=; b=LXK8vW9g+UGetbKaxT6pgkP1MG leEWb60mpey3KnwR419EKcMLy7lazxTECtfqCRjDZn6PCTYOCn/i8fJ7fPnXkjqULzCjo5V2Ghi1B 5F+0afzwRQ/2KagG6qMBk8opaoDk7KGvTpjczaEtS3KfDIJFv7Ll0jKOQy/IQcHI/ays=; 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 1vynmR-0001c4-J8 for openvpn-devel@lists.sourceforge.net; Sat, 07 Mar 2026 09:17:05 +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 6279GuNG021848 for ; Sat, 7 Mar 2026 10:16:56 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 6279GufW021847 for openvpn-devel@lists.sourceforge.net; Sat, 7 Mar 2026 10:16:56 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 7 Mar 2026 10:16:44 +0100 Message-ID: <20260307091654.21823-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 Avoid sign-compare warning and do not ignore error return values. Change-Id: Ia57fa6d2469be08343c0457dd0213f062bc4cfa5 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: 1vynmR-0001c4-J8 Subject: [Openvpn-devel] [PATCH v6] openvpnmscia: Improve check of vsnprintf return value 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?1858994205970845790?= X-GMAIL-MSGID: =?utf-8?q?1858994205970845790?= From: Frank Lichtenheld Avoid sign-compare warning and do not ignore error return values. Change-Id: Ia57fa6d2469be08343c0457dd0213f062bc4cfa5 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1504 --- 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/+/1504 This mail reflects revision 6 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpnmsica/dllmain.c b/src/openvpnmsica/dllmain.c index 2bb0e1b..85ebda9 100644 --- a/src/openvpnmsica/dllmain.c +++ b/src/openvpnmsica/dllmain.c @@ -98,11 +98,6 @@ return true; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - void x_msg_va(const unsigned int flags, const char *format, va_list arglist) { @@ -124,7 +119,7 @@ /* Field 2: The message string. */ char szBufStack[128]; int iResultLen = vsnprintf(szBufStack, _countof(szBufStack), format, arglist); - if (iResultLen < _countof(szBufStack)) + if (iResultLen > 0 && (unsigned int)iResultLen < _countof(szBufStack)) { /* Use from stack. */ MsiRecordSetStringA(hRecordProg, 2, szBufStack); @@ -194,7 +189,3 @@ hRecordProg); MsiCloseHandle(hRecordProg); } - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif