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-08T11:37:21Z
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
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