Fix overflow in DecodeInterval
Joseph Koshakow <koshy44@gmail.com>
From: Joseph Koshakow <koshy44@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2022-02-11T19:48:21Z
Lists: pgsql-hackers
Attachments
- 0001-Check-for-overflow-when-decoding-an-interval.patch (text/x-patch) patch 0001
The attached patch fixes an overflow bug in DecodeInterval when applying the units week, decade, century, and millennium. The overflow check logic was modelled after the overflow check at the beginning of `int tm2interval(struct pg_tm *tm, fsec_t fsec, Interval *span);` in timestamp.c. This is my first patch, so apologies if I screwed up the process somewhere. - Joe Koshakow
Commits
-
Fix portability issues in datetime parsing.
- 591e088dd5b3 15.0 landed
-
Fix overflow hazards in interval input and output conversions.
- e39f99046710 15.0 landed
-
Add a couple more tests for interval input decoding.
- 1b208ebaf14e 15.0 landed