Re: BUG #18614: [ECPG] out of bound in DecodeDateTime
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bruce Momjian <bruce@momjian.us>
Cc: p.nekrasov@fobos-nt.ru, pgsql-bugs@lists.postgresql.org
Date: 2024-10-22T05:53:50Z
Lists: pgsql-bugs
Attachments
- 0001-ecpg-Fix-out-of-bound-read-in-DecodeDateTime.patch (text/x-diff) patch 0001
On Fri, Oct 18, 2024 at 02:51:32PM +0900, Michael Paquier wrote: > It is not entirely the fault of this patch, because the same error is > done a couple of lines above when using an incorrect hour number with > timestamp_to_asc3. The correct thing to do would be in the lines of > what num_test2.pgc does with its check_errno(), I think where we'd > check for the errno returned by PGTYPEStimestamp_from_asc() and > printf() its information in the output of the test. And we should do > that for both the old timestamp_to_asc3 and your new timestamp_to_asc4 > if we want to be completely correct. And here is what I had in mind, checking the error code on top of the output. The output is really optional, but that maps with 0 with the offset applied, so I've just kept it. -- Michael
Commits
-
ecpg: Fix out-of-bound read in DecodeDateTime()
- 9ecfd8a48adf 12.21 landed
- fcafbaadf7e5 13.17 landed
- 9a51d4af12a7 14.14 landed
- 335501fb2b80 15.9 landed
- a1e613b81aa0 16.5 landed
- 2c37cb26f8af 17.1 landed
- a0bff38d133a 18.0 landed