Re: BUG #16953: OOB access while converting "interval" to char
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: t.larionov@postgrespro.ru, pgsql-bugs@lists.postgresql.org
Date: 2021-04-12T03:04:23Z
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
Commits
-
Fix out-of-bound memory access for interval -> char conversion
- 6540322fad8b 9.6.22 landed
- 1cc110f68dcc 10.17 landed
- 5656f2c3dce5 11.12 landed
- 82dd5706ee5a 12.7 landed
- be79debd9688 13.3 landed
- 7a3972597f6e 14.0 landed