Re: BUG #18200: Undefined behaviour in interval_div

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18200: Undefined behaviour in interval_div
Date: 2023-11-18 15:16:16
Message-ID: CAEZATCV+OHuoRFRLvgE4pWOvB2HmkFsrFRrD15DXRoYkWmq=aQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 15 Nov 2023 at 22:41, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
>
> On Wed, 15 Nov 2023 at 18:14, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> >
> > looking at
> > interval_mul(), there is nothing to prevent integer overflow when
> > cascading down, so additional checks are needed there too (in both
> > functions).
>
> Here's a patch doing that. I'm inclined to back-patch this
>

Pushed and back-patched.

Regards,
Dean

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-11-19 15:26:32 BUG #18205: Performance regression with NOT NULL checks.
Previous Message PG Bug reporting form 2023-11-18 01:25:52 BUG #18203: Logical Replication initial sync failure