| Message ID | 20261103200234.17639-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:6022:4121:b0:118:2077:975e with SMTP id
d33csp1123677laa;
Tue, 3 Nov 2026 12:02:48 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AKwUvBwJwhBt3RK6qHbQlHvyMPjZJzArFGAdFqm/8IVrsrURXsVvM0rCS+3uLbSHaEsvKVuaq5wIBFRfmzA=@openvpn.net
X-Received: by 2002:a05:6870:e988:b0:470:e97e:8f8d with SMTP id
586e51a60fabf-4a8e0a57001mr7974839fac.29.1793736167902;
Tue, 03 Nov 2026 12:02:47 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1793736167; cv=none;
d=google.com; s=arc-20260327;
b=b0a45n4GPZWAs6/6Ru+Mu/7q1C8qbFgjUQxd/36RzSJlBqLxv0L/xwmDEGniop0jrM
hQ7CPU856KA3vuawj40ezBy3Z7CS5XHYXpgq7Z8wnHzhlu6Xv3ZZIMOsLJ49s+8J6mIB
wphDpVQHYQ45GfiX5yh6maCo6gWonfi+OutgrOy31LN+hY0k9zkf1I1w4nub8EVQfu73
m/oJR6y9bmYYSHZ8VeXCsgdTK7Wamlq5qVmXCEicL8LeuIjdFbOH9Lro2Zeje8tcxwOZ
Q1lE3AHikiXP8PIB8uBV9UEw1rdvKVuyhoizLKAYgS+VsCJk3uZmUKprFvkEeaoMJMiq
9A/A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
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=TxxmJyMxPYQEfo+vn8q9AhX7e1v7GzecOKVG7NGSy4Q=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=djpPH6KwuQRhvwUFQFeA8ORkhm0qHqQmf4ia73pn6tz9CUzoVlu5Fbx23RhOAPgSbR
9PWGgN+840J5e9zBI2NL7mJE3jkqHKdnGqtjGkj32R26wNvTePfh9RNomrg10CYex97Q
oEyLskRLh51X2p/UNTwyKnXsDN1v/4oL/WcIEIS6W2kDJcKHdXZsS4OMQ8EeMKCtbVrH
Z9fZtaHK1anTRWlyJG+HFhndfMgU3fPPS5Zpjxxhj83nP3J9u6sf4ja9gMzmVIJaiFVO
Xs5YqyFMWKeR1Vkg0EVB12uvYXuNfFHlbLr2oGMTkV/dMsx+xuMJ1ZGmQG5dHxdUtVpL
Nifg==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=FNUol0J0;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=Ej0hJ3wZ;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=i0fgp5X5;
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-4a921bdf376si14831528fac.329.2026.11.03.12.02.47
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Tue, 03 Nov 2026 12:02: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=FNUol0J0;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=Ej0hJ3wZ;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=i0fgp5X5;
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-Unsubscribe-Post:
List-Owner; bh=TxxmJyMxPYQEfo+vn8q9AhX7e1v7GzecOKVG7NGSy4Q=; b=FNUol0J0qI0u27
vRQ1wizcXjJUZ0OJzQA14dGORP6KloPYreSwmCr8AtmxTsXkxFSb7/b7OWhRjwXSDYFvyLsADJqDf
ksYJDYUultPlLFySQFRA6CLNAKdtWgpr1Lq5s7sLShir7KVKViRCnIftOrSV86nXecG58nKDiR9ze
fLA=;
Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com)
by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.100.1)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xOKiT-000000002q1-29yy;
Tue, 03 Nov 2026 20:02:45 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1)
(envelope-from <gert@blue4.greenie.muc.de>)
id 1xOKiR-000000002pt-34vK for openvpn-devel@lists.sourceforge.net;
Tue, 03 Nov 2026 20:02:43 +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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=/vh5z5Zax/ItEqfPWhXxq61q/lIWkuEZqdbgysKk64M=; b=Ej0hJ3wZvelosUBrjkRaJWtr1V
X1/Ua1lUMJWdvns6nWFk9085a3eU9NMd7WVv77Mpq6tHEKEhVdAdOhouNySl12o0RjUUTytOTj+vf
KW9zCdCWo3OaTw+SfWTqQ+41NgMGhfd7D2LBeY/Oe+q9vTnzsu5BeQ3KUnCMacSPF5gc=;
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-Unsubscribe-Post:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=/vh5z5Zax/ItEqfPWhXxq61q/lIWkuEZqdbgysKk64M=; b=i0fgp5X5gPoWzT9W6FvNMq6+wo
o+eW7rDXhS1wpB8qJLGBbFtaZXUO+fAX12zOFaSYmXDqwA5sbEnmXLUnDtbuxnvuudMNI54awM2BN
6AGK8xiuLRDEOgjyqyBp4zS2sc/aTRXc9d/Op9AGcS6Nm9FNu4SQ6ZgO75KKYtO9+WZw=;
Received: from [193.149.48.129] (helo=blue.greenie.muc.de)
by sfi-mx-1.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1)
id 1xOKiQ-000000005BT-0G61 for openvpn-devel@lists.sourceforge.net;
Tue, 03 Nov 2026 20:02:43 +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 6A3K2Z8i017673
for <openvpn-devel@lists.sourceforge.net>; Tue, 3 Nov 2026 21:02:35 +0100
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6A3K2Zfb017672
for openvpn-devel@lists.sourceforge.net; Tue, 3 Nov 2026 21:02:35 +0100
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Tue, 3 Nov 2026 21:02:24 +0100
Message-ID: <20261103200234.17639-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.55.0
In-Reply-To:
<gerrit.1793733304000.Ib53e82554712d881b1e24f6f3a2f8fbb702951bd@gerrit.openvpn.net>
References:
<gerrit.1793733304000.Ib53e82554712d881b1e24f6f3a2f8fbb702951bd@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: 1.3 (+)
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: From: Razvan Cojocaru <razvanc@mailbox.org> GetRegString()
passed default_value, which is built from the install path, as the swprintf()
format, so a '%' in the path was interpreted as a conversion. Print it with
"%ls" and treat only a negative [...]
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: 1xOKiQ-000000005BT-0G61
Subject: [Openvpn-devel] [PATCH v1] openvpnserv: don't use registry default
as format string
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: 1880868695911684593
X-GMAIL-MSGID: 1880868695911684593
|
| Series |
[Openvpn-devel,v1] openvpnserv: don't use registry default as format string
|
|
Commit Message
Gert Doering
Nov. 3, 2026, 8:02 p.m. UTC
From: Razvan Cojocaru <razvanc@mailbox.org> GetRegString() passed default_value, which is built from the install path, as the swprintf() format, so a '%' in the path was interpreted as a conversion. Print it with "%ls" and treat only a negative return as failure. Format string use introduced in b1263b06 ("Ensure strings read from registry are null-terminated"). Change-Id: Ib53e82554712d881b1e24f6f3a2f8fbb702951bd Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org> Acked-by: Heiko Hund <heiko@openvpn.net> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2110 --- 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/+/2110 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Heiko Hund <heiko@openvpn.net>
diff --git a/src/openvpnserv/common.c b/src/openvpnserv/common.c index 7a23d41..671ddde 100644 --- a/src/openvpnserv/common.c +++ b/src/openvpnserv/common.c @@ -38,7 +38,7 @@ if (status == ERROR_FILE_NOT_FOUND && default_value) { size_t len = size / sizeof(data[0]); - if (swprintf(data, len, default_value)) + if (swprintf(data, len, L"%ls", default_value) >= 0) { status = ERROR_SUCCESS; }