Re: BUG #16953: OOB access while converting "interval" to char

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: t(dot)larionov(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16953: OOB access while converting "interval" to char
Date: 2021-04-08 11:37:21
Message-ID: YG7q8YcvFcXCAbAH@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-04-08 13:35:45 BUG #16954: After install postgresql.service activates but does not activate postgresql@11-main.service
Previous Message Julien Rouhaud 2021-04-08 11:04:03 Re: BUG #16953: OOB access while converting "interval" to char