From patchwork Wed Nov 26 10:43:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4632 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6c3:b0:7b1:439f:bdf with SMTP id j3csp3239608maw; Wed, 26 Nov 2025 02:43:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXFIgxlMULP9rfHplVOC5Imppo1ZDd8DWjA5XaK7cni/70jW/QK1M2H+La3mFcMEBV8ep3qwt+X6U8=@openvpn.net X-Google-Smtp-Source: AGHT+IGYRBrJhjf/CLZksGhcU0T5na7DunRA+mqpiJbzm8eBNUq8cvdzL9qvqztctmOGqokdpTBO X-Received: by 2002:a05:6871:5293:b0:3e8:8a65:8293 with SMTP id 586e51a60fabf-3ecbe566f21mr9453987fac.29.1764153811450; Wed, 26 Nov 2025 02:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1764153811; cv=none; d=google.com; s=arc-20240605; b=hkPOJcc7x9EQ5vnaS8iIH2d2s3HFWs/euNPLJuZ5IcAHVAx0it4nH2IEH00MXtTAwX oyxdlOQ0XeSqTW5+RbzCSGQGAzWIIKcsCrQqWHRu5F1+1f/7+mJHO6VxbZHbgq8kZD3G 43WHsXJUqqDprF0ZHPOns8DVU/kDJdyZW5i7RlpkI6dlLsUQNc5bztvcwc0IfY408UKS Pnh4WOxH51FGPvuQpjLbY1Hbz2+fIpPWAgz5MdbpADsQkV4I2nnrmMQ/tR8/wwMFJ4Qb 3gDyPaO+poa+vTxIFhUFRcf+AnAGZGcD5/YFwxlvu4FrBkmgi/HQkOKGmK44Odwwr1gB 36Uw== 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=LRjUFDQAvuPMQCdFR2aaHsA8x9Mp+70baI5eKsmyctg=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=SWejIqHAlCLcLMxClZJmHHgdOLXezaTSwkQQQ6xBoNM6WUSwF6Y8vwgZz91mE3HP20 vsVMJe74oSWjy9QDEsu4kWdY4AoGmHZGydUeDDp/EhAXT88gRGgc2rD8hRVMWs70sqXQ FMNfXXSf60sKMYGyYD/VJufKp/c3cElPjkwbl+ZwfZF097hOk80vBJsevizbaHJhj41b qp62MEkYtz5FDl6HONrpSMiyp5+bWeD8G9zW8EjAqY9elWY+UuUgJ9CMZfrS6vggLtzj WkcoZvxiJFaLDSEtbNp1reoSIQUAxkdKzx6Nv93a907ILvxon2yYYAqU8C+iv+sHGkIc BLgQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=M6kwkJbe; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="Sfm/xgHb"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ApGpxUCX; 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-3eca1b62f2asi3407228fac.755.2025.11.26.02.43.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Nov 2025 02:43:31 -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=M6kwkJbe; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="Sfm/xgHb"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ApGpxUCX; 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=LRjUFDQAvuPMQCdFR2aaHsA8x9Mp+70baI5eKsmyctg=; b=M6kwkJbeqc8GXrXlKWVmZUJ0cN cD8feF201jvcrkEiY8doBQrxI3REb2/UN5rAmMX1L61ndvVbZkwPZq8jDrxHCIikKW/0/mdrJFFwL mKo/fs4ShnvabuSqfwStoa2IaKEoGTYqem5AA3N1TRcRAjQPpzAlnLLi2ZzGieP9Mshs=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vOCzf-0004PT-W2; Wed, 26 Nov 2025 10:43:28 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vOCzf-0004PM-FX for openvpn-devel@lists.sourceforge.net; Wed, 26 Nov 2025 10:43:28 +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=2nsUDJPY+4/SeTiu9atulRd3fEJTktNk4O0rwu/3RwI=; b=Sfm/xgHb0347kUusnSb0lyM6DC ylMFFTFgnHNEgZmJkV4FRQHuNr2amajmP9RELfwiThQruOsymfKWXNz9NY7qHfWJwxnEbYu7Q1uUX w0EalekEqAu9yAO4Me4vQU2TTztOS5kzBLB8PKCirnn+AtyHmOKDH/uEv5rE2xoQ8g+4=; 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=2nsUDJPY+4/SeTiu9atulRd3fEJTktNk4O0rwu/3RwI=; b=ApGpxUCXHkOyYOTAf8qtmDg2dg y80hluxtV8wHzGuWPJNAKspkKWljOm9N8p8rHmm6U3Ktco/hmbj6p10Kgyuef7ct1Y9Kzb1PLPxsi tHZoxjwWS9Cf6x4sjj7HZpr0zabuzkGcy7mG04xY4aDjTU3A84psUdqerhmplphAjxSo=; Received: from [193.149.48.134] (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 1vOCzf-0006gE-92 for openvpn-devel@lists.sourceforge.net; Wed, 26 Nov 2025 10:43:28 +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 5AQAhFm6004833 for ; Wed, 26 Nov 2025 11:43:15 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5AQAhFTq004830 for openvpn-devel@lists.sourceforge.net; Wed, 26 Nov 2025 11:43:15 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 26 Nov 2025 11:43:07 +0100 Message-ID: <20251126104315.4776-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.51.2 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: Heiko Hund In case not all domains can be converted in the available buffer, return the size of the already converted domains size plus the second terminating zero for the MULTI_SZ. 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: 1vOCzf-0006gE-92 Subject: [Openvpn-devel] [PATCH v3] iservice: return correct size when domains are truncated 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?1849849346640238111?= X-GMAIL-MSGID: =?utf-8?q?1849849346640238111?= From: Heiko Hund In case not all domains can be converted in the available buffer, return the size of the already converted domains size plus the second terminating zero for the MULTI_SZ. Reported-by: Marc Heuse Reported-by: stephan@srlabs.de Change-Id: Iabad046c930dd0f38ec50d1c43d8b3288816df7d Signed-off-by: Heiko Hund Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1391 --- 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/+/1391 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 9c533c1..5fb7f2b 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2214,7 +2214,7 @@ { /* Domain doesn't fit, bad luck if it's the first one */ *pos = '\0'; - *size = converted_size == 0 ? 0 : *size + 1; + *size = converted_size == 0 ? 0 : converted_size + one_glyph; return ERROR_MORE_DATA; }