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-12 03:04:23
Message-ID: YHO4t+MnSNPcMPAU@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Julien Rouhaud 2021-04-12 03:13:02 Re: BUG #16953: OOB access while converting "interval" to char
Previous Message Tom Lane 2021-04-12 00:46:37 Re: BUG #16959: Unnesting null from string_to_array silently removes whole rows from result