Fix overflow hazard in interval rounding

From: Joseph Koshakow <koshy44(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Fix overflow hazard in interval rounding
Date: 2024-02-13 18:31:22
Message-ID: CAAvxfHfpuLgqJYzkUcher466Z1LpmE+5Sm+zc8L6zKCOQ+6TDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Attached is a patch that fixes some overflow/underflow hazards that I
discovered in the interval rounding code.

The lines look a bit long, but I did run the following before committing:
`$ curl https://buildfarm.postgresql.org/cgi-bin/typedefs.pl -o
src/tools/pgindent/typedefs.list && src/tools/pgindent/pgindent
src/backend/utils/adt/timestamp.c`

Thanks,
Joe Koshakow

Attachment Content-Type Size
v1-0001-Fix-overflow-hazard-in-interval-rounding.patch text/x-patch 3.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-02-13 18:46:17 Re: Fix overflow hazard in interval rounding
Previous Message Nathan Bossart 2024-02-13 18:10:44 Re: glibc qsort() vulnerability