From patchwork Tue Jan 31 12:25:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 3031 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp68927dyk; Tue, 31 Jan 2023 04:26:34 -0800 (PST) X-Google-Smtp-Source: AK7set9sgy9F6Xd3O4/ZiVh4XBsnf9zANOJeB0j2GGQjbt/lRspg0uTUMtFQn6D13KJS+WMEZm4x X-Received: by 2002:a17:90b:1b48:b0:22c:59c3:869a with SMTP id nv8-20020a17090b1b4800b0022c59c3869amr13939930pjb.21.1675167994252; Tue, 31 Jan 2023 04:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675167994; cv=none; d=google.com; s=arc-20160816; b=zwpT+OQ87jFsffG5vwByXBK0Kl/H9pMxDzg4naB8jDV1EUUu0Xsvv22TwYGSMATSdC 9zcQM4GFoi1bTKmacDiRAXCtse3T7R0FPn7EAlfD2dvwATiUC2DnNKlODBt8IJ7wKUFY /KgCk2btr8HStqy6132fbn3MIMuJFonnei/jiMq31rR6eeXXTauFrPec2z8X/r/FcSnc w0KB1UbTTcNoFs3BqbpqA+qCpysD8dynsICHkaAiYvAeBBUTihQnLDOR/u6UZihfNDom E5UZcaPbImM+HPIsiV7wFbf1Mj3KEA0JEhx8lWD7F5OQjCliFfCGpSNBTFuc0/5JA3l+ ly7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature :dkim-signature; bh=AVMClI4wwqYYaA6Fq9fPml2o67LsfbEPlgcQ3ML5v/I=; b=KlAZw94auEco9eSU9xJrgXiHtrDBc7QpiitEdE75Ra/eRAiBzwEiRQ8PAim38U08Nc Cr+8v+kkIwXlJXFJHtqvHfD9tRtc4aVaPerIUBIgKYeWv6uQ4/B1H/kkkrVsk4+G40wu MK1DVizwEKVtYp0MYYSV0Nh9t0M8b9ypnobibD+bprw2xt/N3LHoqsrDgGsSXOEo8/fR KtD9eZESeCEj1fByWxUdKnsXrCMa9uLxRHI/tvLfCOUoNS2KvmPDiICx8/ZuhVSo03RT jvvk4c46uybe8Vat/K+GWg0Gv/45hok+JJnb1zsp5LLVc+iFWp8UwqI5DicQjITDhUGs g+0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Xf33HcPK; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=EKQS8NEz; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=lvTRgdmU; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id md21-20020a17090b23d500b0022e5d2d5837si4063259pjb.53.2023.01.31.04.26.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2023 04:26:34 -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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Xf33HcPK; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=EKQS8NEz; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=lvTRgdmU; 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=QUARANTINE dis=NONE) header.from=gmail.com 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.95) (envelope-from ) id 1pMpiG-0007bq-8o; Tue, 31 Jan 2023 12:26:11 +0000 Received: from [172.30.20.202] (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.95) (envelope-from ) id 1pMpiF-0007bh-Jq for openvpn-devel@lists.sourceforge.net; Tue, 31 Jan 2023 12:26:10 +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:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=a0AtAeQdAoeFuJthMnyGPwmjxx/mWdcI0voXQ2LUil8=; b=Xf33HcPK/S3oWuwCzdQOYSZB3f 5dz7GdJ2cF4BqU0pXftwaRus1/RNrDOXAKHxDNRKNO9md99COFmutgA/jQHY1hz5ZGTMexSjT2rOK XvQrJbthtdtM12m08ztSyHzywe/kC5lqx8U9+pqobNWvd84YeI+h2ZE+zfbSAYg2p1Lc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type: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=a0AtAeQdAoeFuJthMnyGPwmjxx/mWdcI0voXQ2LUil8=; b=E KQS8NEzk/P6j3AOXMmokmw0K8k6CAhacKCOwrb0Ut6jgrsfWmR5nCnzq26XXKqSLqHSJJoH2yNJZv rR4dNdBva0iQKxK5pIJZ/QorwMwzyQnsOlzF7d57fgqR66tsg6V6xkHSuMY5MSTAazMioHLzjqYEi sSnedw0kW/9e4e9o=; Received: from mail-io1-f44.google.com ([209.85.166.44]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1pMpi8-0006dI-WC for openvpn-devel@lists.sourceforge.net; Tue, 31 Jan 2023 12:26:10 +0000 Received: by mail-io1-f44.google.com with SMTP id l7so3163895ioa.7 for ; Tue, 31 Jan 2023 04:26:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=a0AtAeQdAoeFuJthMnyGPwmjxx/mWdcI0voXQ2LUil8=; b=lvTRgdmUkkxgIqu3CQgqV1iI6ms2AM3eEmHROE+z8MV5p9cvM+crAaGvy6OqN67+GT isxsawODgxn4Vjt5XRcwfW+QdDAvSg8y2aDnflqAg5nhhuD4nx8rR7Db/TkoFZAMw1a2 U0uxDSrqjGvflXgDwI4XTgczxdGaGABA3L+syZ6Au2kIBBI/MxWD3UsdbGR+dzTgVDuF z4eERkU7+aStM0oKc9cFnis/dl/arZYbUeugQIFzxgxXtxorkiiQvFmLpC8TLAcztqn3 p8+hNPCKO8sVuPZ9f1QM+/U7TaxpdvSpIEwrxhNBj+6PsRY2a6SVVvPU+84AjN93gMus jOuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a0AtAeQdAoeFuJthMnyGPwmjxx/mWdcI0voXQ2LUil8=; b=IvZrauM91Aic9hswtD7qE/a7Bn8sV6KaFKllQtbA4shc3/GZ90gMs5aasUHoZdBGS0 LDuVdrt6VM5vsfVtmOd0Sgzm0OUv3XLhi1yphZOIoeIpi9mbj6yMsKc8JgxbEk4w8FQ3 tndbIBmphlutvmP8RQCJ5xVhBXzTVml/udZ1Hqurew4PtdBM3fJY/KKbh4RB5TWsVyQ9 UkTBWqCCZwVuuNzDWDq9rpTgd1voOYkPeVUKROtSY2/uhpAv9feKwjwmHIntC2diwMRn tV/hEXRlN6movIITnVCAWH8XyVzfs3TKaFUB3oLb7ND08lG/iRmkk99qBc+VabFi+BRN klOw== X-Gm-Message-State: AO0yUKWea6cyr0Y2CCq7Ky49D5WqdHOeSCUZRVIZm2hnD07HdVNrWXya frSZ0Vigss80+ZsMt1RfyTL+442CuQ4= X-Received: by 2002:a05:6602:487:b0:717:d0d:8a8f with SMTP id y7-20020a056602048700b007170d0d8a8fmr11021832iov.1.1675167959954; Tue, 31 Jan 2023 04:25:59 -0800 (PST) Received: from localhost.localdomain ([2a00:1d50:3:0:82:6e:da2d:2e03]) by smtp.gmail.com with ESMTPSA id f21-20020a5d8795000000b0071ce71f8a09sm1823685ion.44.2023.01.31.04.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 04:25:59 -0800 (PST) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Tue, 31 Jan 2023 14:25:42 +0200 Message-Id: <20230131122542.1887-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.38.1.windows.1 MIME-Version: 1.0 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: Lev Stipakov WinAPI uses __stdcall calling convention on x86. Wrong calling convention causes UB, which in this case breaks dco-win functionality. Signed-off-by: Lev Stipakov --- src/openvpn/dco_win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.44 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [lstipakov[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.44 listed in wl.mailspike.net] X-Headers-End: 1pMpi8-0006dI-WC Subject: [Openvpn-devel] [PATCH] dco-win: use proper calling convention on x86 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: , Cc: Lev Stipakov Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1756540954557542377?= X-GMAIL-MSGID: =?utf-8?q?1756540954557542377?= From: Lev Stipakov WinAPI uses __stdcall calling convention on x86. Wrong calling convention causes UB, which in this case breaks dco-win functionality. Signed-off-by: Lev Stipakov --- src/openvpn/dco_win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/dco_win.c b/src/openvpn/dco_win.c index 7594024c..da1e1fbc 100644 --- a/src/openvpn/dco_win.c +++ b/src/openvpn/dco_win.c @@ -110,7 +110,7 @@ dco_connect_wait(HANDLE handle, OVERLAPPED *ov, int timeout, struct signal_info { volatile int *signal_received = &sig_info->signal_received; /* GetOverlappedResultEx is available starting from Windows 8 */ - typedef BOOL (*get_overlapped_result_ex_t) (HANDLE, LPOVERLAPPED, LPDWORD, DWORD, BOOL); + typedef BOOL (__stdcall *get_overlapped_result_ex_t) (HANDLE, LPOVERLAPPED, LPDWORD, DWORD, BOOL); get_overlapped_result_ex_t get_overlapped_result_ex = (get_overlapped_result_ex_t)GetProcAddress(GetModuleHandle("Kernel32.dll"), "GetOverlappedResultEx");