Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1whjh0-000OGm-1H for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 08:01:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whjgy-00Bl6A-39 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 08:01:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1whjgy-00Bl5p-2E for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 08:01:09 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1whjgu-00000000QrS-44Dg for pgsql-hackers@postgresql.org; Thu, 09 Jul 2026 08:01:09 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 4911862019B for ; Thu, 09 Jul 2026 10:01:05 +0200 (CEST) Received: from s981.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 3590F620A82; Thu, 09 Jul 2026 10:01:05 +0200 (CEST) Received: from localhost (unknown [172.22.191.6]) by s981.loopia.se (Postfix) with ESMTP id 33F6622B1818; Thu, 09 Jul 2026 10:01:05 +0200 (CEST) X-Virus-Scanned: amavis at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s471.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s899.loopia.se ([172.22.191.6]) by localhost (s471.loopia.se [172.22.190.35]) (amavis, port 10024) with LMTP id HqGOjVocHbR7; Thu, 9 Jul 2026 10:01:04 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s899.loopia.se (Postfix) with ESMTPSA id C2E0E2C8BA40; Thu, 09 Jul 2026 10:01:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1783584064; bh=JErvsSEs56/fvLK8LlIGlXuzVHUdZO7ugEEFIQS4EtY=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Ff/o5iGovwCoRNBEJPmKuVwz52YYhzVv+6qf65txaYp5o2BTJyALrs4yfLdjP3Mix e9M60h4OzXpLwXC3u6lKuTWe7Akj1ARL46B66/OV11JQ4387+Qz4NYba4Mv7KxcXSi YaWpMze0H6J0GEOs1SiE+KwDUVm9HTW61W/NEApw2NbnSc+VbHBh1fBo918+UGNoef fUDaQaKV5lWN6FPs8f6yBFdggP8yzaEefd9yINd+uNMFLqkUN7DA5j56BbW1vN0gXv VDXESNp7sSyYd26C5yb5LfuFvsA7Zfjdr6zOHwmDNqMFVPPxYH3iTRllcVaEZ3vaq5 TjVGmHVLyRL9g== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.12\)) Subject: Re: Possible replace of strncpy on xactdesc.c From: Daniel Gustafsson In-Reply-To: <20260709.151540.712205027352253675.horikyota.ntt@gmail.com> Date: Thu, 9 Jul 2026 10:00:54 +0200 Cc: =?utf-8?Q?Mario_Gonz=C3=A1lez_Troncoso?= , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <2F655280-ACEB-47C8-9F0A-35709B96373F@yesql.se> <20260709.151540.712205027352253675.horikyota.ntt@gmail.com> To: Kyotaro Horiguchi X-Mailer: Apple Mail (2.3776.700.51.11.12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 9 Jul 2026, at 08:15, Kyotaro Horiguchi = wrote: > Wouldn't memcpy(parsed->twophase_gid, bufptr, xlrec->gidlen) express = the > intent more directly? memcpy would relax the check for twophase_gid being a char array, which = albeit being a small protection still seems like an API characteristic worth = keeping. -- Daniel Gustafsson