Fix overflow hazard in interval rounding - Mailing list pgsql-hackers

From Joseph Koshakow
Subject Fix overflow hazard in interval rounding
Date
Msg-id CAAvxfHfpuLgqJYzkUcher466Z1LpmE+5Sm+zc8L6zKCOQ+6TDQ@mail.gmail.com
Whole thread Raw
Responses Re: Fix overflow hazard in interval rounding
Re: Fix overflow hazard in interval rounding
List 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

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: glibc qsort() vulnerability
Next
From: Tom Lane
Date:
Subject: Re: Fix overflow hazard in interval rounding