Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUSyl-0008Jx-Ex for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Apr 2021 11:37:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUSyk-0006AI-Dj for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Apr 2021 11:37:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUSyj-00064t-2h for pgsql-bugs@lists.postgresql.org; Thu, 08 Apr 2021 11:37:42 +0000 Received: from [66.111.4.26] (helo=out2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUSyf-0004E2-LO for pgsql-bugs@lists.postgresql.org; Thu, 08 Apr 2021 11:37:40 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C82075C011C; Thu, 8 Apr 2021 07:37:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 08 Apr 2021 07:37:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=p9zWEudQQsWEj/QjYbvAaUlo0FO v55vq+5TfV9SNZv4=; b=dL6FgccsOYmIJvuwGOp6shlChx8TO6ImtmwbXYpvssc wEnYRPhz2/2cASMCTOibd6iz2Rwdqq9Gi5lTr3KkG+QcDzLTRSnHOCvtZsRv2BuP He8r7o+dZnQGuw0RewFjhjly7RYqn3GSD/WZd8B9Dbk+IusWI182Kv0OnV7yl9Ft ytc3ApzeTCtvLyN0OT5GcZhzEWv11MVdJ3CHDCCdIZQ5d94fNsoqf2UHTues82d0 WskcO3Ek9n1djKh59OlLPTGmG4WvKO5ddX8868muRLlx8QsYuwH+yD/RmiQt1yiu SfOmEo5Kz/7VRxBIijnqVqB4r9D0LmhXZ1cc9bZ/eSQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=p9zWEu dQQsWEj/QjYbvAaUlo0FOv55vq+5TfV9SNZv4=; b=sT9qKvbEQ1v/QMwLTOsPo5 7cZVkauw+EsJUynyPNju0qP6JYREpFKfV3YpL35vER8MArx/Y1xkfTbyP0FDL5yl YEPA8XgA0PPDhkGKLLtNQthGDK76zHHfa9fZN3HWbwcUPv+wlH+hcBoYWveIMan8 7SgHwtcnwW3t3TPMVj86fbBC3iHubdXijrJJ4+2brxn3+ajIZQiLKsfQLECfDJEy 6EQy89RWMlfMR/8d7NjQrk2uvp9jv3Nj4R7HVCAWGvuYmUZYyZkcNGn3yjZrp53q 55v4N3pJpiavWQOL4TpFLAemP20S0w2Xb/5p28Zg4kM6tkBzV1SErMusN3PSp9jw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejledggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpedvgeduuefhtdeuleettdevjeehheeiveeuieegleetgeeljeelieeuieehgeevhfen ucfkphepudduuddruddtvddrudektddrudekheenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id BC41B108005C; Thu, 8 Apr 2021 07:37:24 -0400 (EDT) Date: Thu, 8 Apr 2021 20:37:21 +0900 From: Michael Paquier To: Julien Rouhaud Cc: t.larionov@postgrespro.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16953: OOB access while converting "interval" to char Message-ID: References: <16953-f255a18f8c51f1d5@postgresql.org> <20210407120856.3rjxxnnzzxn74vyv@nol> <20210408110403.wr3d552xilqsx4us@nol> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JTaYG/Q6oAxStSbK" Content-Disposition: inline In-Reply-To: <20210408110403.wr3d552xilqsx4us@nol> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.26 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --JTaYG/Q6oAxStSbK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 08, 2021 at 07:04:03PM +0800, Julien Rouhaud wrote: > I'm fine with it too, although I'd probably go with [-13, 13] just to make sure > that there's isn't silly off-by-one mistake. Also, I guess that you'd just want to compile twice a modulo based on MONTHS_PER_YEAR to get the correct positive position in each array. > I'll just wait a bit to see if anyone else has any opinion on whether -1 month > should be January or December. Sure. If you can send an updated patch, that would be great. -- Michael --JTaYG/Q6oAxStSbK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmBu6vEACgkQnvQgOdby QH0P2RAAit7M+EDvayLhypKa+gB7GXNE6BvfJBODaP3/Abre36jTmwN8ud73j95o 2r5li/y60fVPHhHEohoyoWtnhH8vfKgLMTmCvwGhJRWsb/lvw3nuGzZs6G8e6sqI +ZTcwxYdrUdcS8YJoKVBFY2KoAh26RM4QLm9dlxZLwZpaFgujc6v7qXYk+0OOSZh lJA7u1/ljK/AqXuvZF7aaRU1875qHZU/hCUX3ep9byIr0YzpTXKhlf+FsE+HA/MN qcZCSkt6Zl2RNMISmL1iEJTgV8cvjTRn826H6I5Sla+KFDtGPO3c8G3RQahkl4eh j4n7gHiShGmkwyn0lbcrRiVntKN6GuA7AvsIAUxbmcoftPmF6krOat+S+JPPssD2 GRw0BF4TEG2M8Ix7TQsYJSXpNhfaFNiNg7qnC5wa/lm1Nv/fpBmTOleNQvt3hUSL smfZJcNZnmyZZQ5NHu8DEKHDj6/CVu9+cp5JjPeDA7gsBPLVJG7STYg/o+X/JS+1 Q3Y/jX1BHYKgMr6fnpsJGutKiXtdCYRBw1MULta/runCspKRrZHRBSiLX6XIh7G/ WVumpYduwQM+L+nxeEafM3cTFlwL/hwYEqUHHtgu8icFzmoxj333RbsyHWu1E2qS FqkOcgHf3k/j3uRaESWbsBVaFtrk1i/ri3geIS26PBLa335mS/A= =etr7 -----END PGP SIGNATURE----- --JTaYG/Q6oAxStSbK--