From patchwork Sun Mar 22 07:19:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: azban X-Patchwork-Id: 4845 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:8796:b0:83c:d90d:321 with SMTP id cq22csp242006mab; Sun, 22 Mar 2026 00:20:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVwEkKCKhdTQmLjja7Jf4J716x0Zv9L5PKpsRe46MLQE8brH+EntuaJOVAJdi8xbjGCB1EVibN0+QU=@openvpn.net X-Received: by 2002:a05:6870:c245:b0:417:4888:3292 with SMTP id 586e51a60fabf-41c1112c20dmr5656450fac.27.1774164000745; Sun, 22 Mar 2026 00:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774164000; cv=none; d=google.com; s=arc-20240605; b=WmTOMAqHSP0WhqRsdrhq2pbef0PEBtsMpJdqES4qFjMxRP1RCeHKbCwIob9BopMSDF Chto5QC3Vvm883VuBM4WmjhOl4vPhmowYjmrXlKa+mDRqiLRMMtzmV3xvMnciItPflVI 96njotuiUTPDjiV8aF+DJuDjFDy5tp21QoRhaQh27PnDdoQ5T+HXT0u1RRZCq3rv3I32 gpTA3PHfH9Z2Jppfdpg4HajYkii8iOnNkwHukxxeM7XrbKiUYr7DCC2T8VLlLwUEOOvT Zscewdrtf16dw8d54r3LZusaltAzyLgoynQI6d8WrnbuLUhgyFxBWl4mMklRw9zVWNDO KllA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :feedback-id:message-id:from:to:date:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=Ag1FcuLYpL+J6dYbtEkva5xxhekYq6SdRYeSMwXGxW0=; fh=I37vhZPGuICZbOiKJJ+210MDIMcPcV/kCIo1c3aMqKw=; b=HqOaAMudXMHQ1a3eOfooLA5fnZhv3VDjpwbiQIonopdFjbG9XWpa6orLfO2Zd+KtUA G47WeF3+E/9YqKlmFGWLn3pN2iWP1qNfRiYkQ8PCR62hArBIk7umljiCjkqiXIE7tVd/ SNA6sgF9Gm7i3RUfCgY0F1HpcCgYM0ChqmpkzrluF4XVp3Fl70idJZsIOAq0OGhsEMQy 7Co5KIRQrlyLtTn6CyPeadBKwcIlBy7THJmr4a4S0NDmKHK7tPYyBFWB5JAjONv8RYEw 9XlU56H1gSgL6c6Gc4zBAMD7Q3CrT2Oq6VbZk1Z7Wuu6xk+6lryySJtFN1ITNdjvGRAG SY+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Pxsa84wC; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=OsbElnU9; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ODLZF6nm; dkim=neutral (body hash did not verify) header.i=@azban.net header.s=protonmail header.b=uaxfegJt; 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-41c14f1e970si4637176fac.311.2026.03.22.00.20.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Mar 2026 00:20:00 -0700 (PDT) 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=Pxsa84wC; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=OsbElnU9; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ODLZF6nm; dkim=neutral (body hash did not verify) header.i=@azban.net header.s=protonmail header.b=uaxfegJt; 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-Type:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version: Message-ID:From:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Ag1FcuLYpL+J6dYbtEkva5xxhekYq6SdRYeSMwXGxW0=; b=Pxsa84wCCfoLYc7KlPWKes9pF2 YZGKBBB7pIV4K3pRx7NdsauWxDKAa6r+leI0tIYVq1gnisxgyisKP+fbpIqU8k5YLLLlvS0d9/gAb bz7cvXXZkxR5eiOT4I5dJFTUXdv9w9oNGR+KumvlloHFNzpLBc0AOTI+QeVju5c7YG9w=; 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 1w4D6I-0007BS-Gy; Sun, 22 Mar 2026 07:19:54 +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 1w4D6G-0007BK-Uq for openvpn-devel@lists.sourceforge.net; Sun, 22 Mar 2026 07:19:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Message-ID:Subject:From: To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Gr7wNxepQLi3c7gbCUts8z7D4rH2ejbZymeiOV8XJ/k=; b=OsbElnU9zX3Nxc5yEUhtBtraBJ Ipdzo9o1NF38lr+qE6ywQ3UJaOrYH+vjuiFscyVFMYgZX8VCXEbLL84cKk0gXKAdHo76QzhXxdcko ST6BIqreuAOwefuBjpKS+gMHQd5JbMt0Y46m8IE+pVwgzZGbUV1dNHbi/pbb/1c0yQkM=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:Message-ID:Subject:From:To:Date:Sender:Reply-To :Cc:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=Gr7wNxepQLi3c7gbCUts8z7D4rH2ejbZymeiOV8XJ/k=; b=O DLZF6nmk2YWZ6SIPZEUddGsP78RC+n1u1cd3Wm2au5CC1Nb2VDM94Zrz5ovy3djQHCrKrER4YBkH7 gOOKE+TZb/y9Fao2PBNaBl1PevG1lWOh5wd5k3Yehy+b8vTL8zV9sZ4Vgl646LwN5/XIr8dmuit+/ JmkALB0Bo42EdS6Q=; Received: from mail-10624.protonmail.ch ([79.135.106.24]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1w4D6F-0002tG-4H for openvpn-devel@lists.sourceforge.net; Sun, 22 Mar 2026 07:19:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=azban.net; s=protonmail; t=1774163984; x=1774423184; bh=Gr7wNxepQLi3c7gbCUts8z7D4rH2ejbZymeiOV8XJ/k=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=uaxfegJtVD81tM50efXlY6rA74bbnSSNRTOQzLS97347ovZSNG0hec4E+6HKeTeGg ZdV+EWBzDjih9m/hhDxLDlkDvO2bvN4MW9lu9TPwt7BCQsBinADnZJytGXrb3HlT4T hYrr/TSGz6ZErUuc9xUY6wWhJ0R8kDgG9KEsU4qZSszwonNpzZ0vf3rPwYkt7kVXgg i/F3KIeiT1Blj1bz2Gehm7CpnpROJ3a42vXow49N4LGT3VsG8s04DApFlosquFoxEw M2wly4XdD6lNOC35sqHgWVec2FZPou93rZaKTT91XaB/PF8sy7BehEi3KH5v5GgSmK b/m3QdKc8lnpA== Date: Sun, 22 Mar 2026 07:19:37 +0000 To: "openvpn-devel@lists.sourceforge.net" From: azban Message-ID: Feedback-ID: 9660861:user:proton X-Pm-Message-ID: baac9da0fb091254e172b635bdeaa5e129e569a4 MIME-Version: 1.0 X-Spam-Score: -1.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: This previously warned with unused-result, which fails compilation if you are building with warnings as errors. This checks the result and throws an exception if the parsing fails. Signed-off-by: azban Content analysis details: (-1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [79.135.106.24 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1w4D6F-0002tG-4H Subject: [Openvpn-devel] [PATCH] handle result from DcoKeyConfig_ParseFromString 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?1860345791145894433?= X-GMAIL-MSGID: =?utf-8?q?1860345791145894433?= This previously warned with unused-result, which fails compilation if you are building with warnings as errors. This checks the result and throws an exception if the parsing fails. Signed-off-by: azban --- src/netcfg/netcfg-dco.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/netcfg/netcfg-dco.cpp b/src/netcfg/netcfg-dco.cpp index 290c12a8..f41836bf 100644 --- a/src/netcfg/netcfg-dco.cpp +++ b/src/netcfg/netcfg-dco.cpp @@ -265,7 +265,9 @@ void NetCfgDCO::method_new_key(GVariant *params) std::string key_config = glib2::Value::Extract(params, 1); DcoKeyConfig dco_kc; - dco_kc.ParseFromString(base64->decode(key_config)); + if (!dco_kc.ParseFromString(base64->decode(key_config))) { + throw NetCfgException("Failed to parse DCO key config"); + } auto copyKeyDirection = [](const DcoKeyConfig_KeyDirection &src, KoRekey::KeyDirection &dst) {-- 2.51.2