summaryrefslogtreecommitdiff
path: root/src/test/ssl/Makefile
diff options
context:
space:
mode:
authorTomas Vondra2019-11-30 13:51:27 +0000
committerTomas Vondra2019-11-30 13:51:27 +0000
commit3ff660bbeb96086cb1cf880bfb4e2e350cbd21b2 (patch)
treed3fbf2be5b617d0345ea3d8952722c5e6597a12a /src/test/ssl/Makefile
parent98a9b37ba70f24b28478360d9cf7f190b0f75f8d (diff)
Fix off-by-one error in PGTYPEStimestamp_fmt_asc
When using %b or %B patterns to format a date, the code was simply using tm_mon as an index into array of month names. But that is wrong, because tm_mon is 1-based, while array indexes are 0-based. The result is we either use name of the next month, or a segfault (for December). Fix by subtracting 1 from tm_mon for both patterns, and add a regression test triggering the issue. Backpatch to all supported versions (the bug is there far longer, since at least 2003). Reported-by: Paul Spencer Backpatch-through: 9.4 Discussion: https://postgr.es/m/16143-0d861eb8688d3fef%40postgresql.org
Diffstat (limited to 'src/test/ssl/Makefile')
0 files changed, 0 insertions, 0 deletions