| 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-15 22:41:01 |
| Message-ID: | CAEZATCWar0wEJw_eQudbnpZsyC5VCcJ=hngaUD0ZEWWrm2LGbA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
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, because
this seems like something that's quite easily triggered, and returning
bogus results is not good.
Regards,
Dean
| Attachment | Content-Type | Size |
|---|---|---|
| detect-interval-mul-div-overflow.patch | text/x-patch | 7.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2023-11-15 22:54:12 | Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows |
| Previous Message | Jacob Champion | 2023-11-15 19:59:25 | Re: pg_dump needs SELECT privileges on irrelevant extension table |