pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: t.larionov@postgrespro.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16953: OOB access while converting "interval" to char
Date: Mon, 12 Apr 2021 11:13:02 +0800
Message-ID: <20210412031302.tquch5rg5j3eiut3@nol> (raw)
In-Reply-To: <YHO4t+MnSNPcMPAU@paquier.xyz>
References: <16953-f255a18f8c51f1d5@postgresql.org>
	<20210407120856.3rjxxnnzzxn74vyv@nol>
	<YG7YTjuZXylrjGAv@paquier.xyz>
	<20210408110403.wr3d552xilqsx4us@nol>
	<YG7q8YcvFcXCAbAH@paquier.xyz>
	<20210409104246.vkeef6rbyevq46f3@nol>
	<YHAza+N74LHygGnB@paquier.xyz>
	<YHO4t+MnSNPcMPAU@paquier.xyz>

On Mon, Apr 12, 2021 at 12:04:23PM +0900, Michael Paquier wrote:
> On Fri, Apr 09, 2021 at 07:58:51PM +0900, Michael Paquier wrote:
> > Yep.  The regression tests show what I would expect.  I'll check in
> > details later.
> 
> I have spent some time on that today and applied this patch down to
> 9.6, after adding more comments and simplifying a bit the calculation
> method used.  Instead of using the "mon" variable to store an
> intermediate result, I have simplified things so as this only uses
> tm->tm_mon, and "mon" for the position in the roman-numeral array is
> adjusted only once.

Thanks Michael!  I thought we'd want to keep the original calculation for
consistency, but directly computing the needed offset is clearly simpler to
read!





view thread (9+ messages)

Message-ID: <20210412031302.tquch5rg5j3eiut3@nol>
Permalink:  ../20210412031302.tquch5rg5j3eiut3@nol/
Also on:    postgresql.org/message-id/20210412031302.tquch5rg5j3eiut3@nol

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: rjuju123@gmail.com, michael@paquier.xyz, t.larionov@postgrespro.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16953: OOB access while converting "interval" to char
  In-Reply-To: <20210412031302.tquch5rg5j3eiut3@nol>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox