From: | Joseph Koshakow <koshy44(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Fix overflow in DecodeInterval |
Date: | 2022-04-03 22:19:54 |
Message-ID: | CAAvxfHcxS5BDkN0WOaazHGFPXTBeyMJ-L4tWDz7C7tK5RaRzTw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Apr 3, 2022 at 3:06 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> That buildfarm machine is pretty slow, so I'm not in a hurry to test
> it manually either. However, now that we realize the issue is about
> whether strtod(".") produces EINVAL or not, I think we need to fix
> all the places in datetime.c that are risking that. After a bit of
> hacking I have the attached. (I think that the call sites for
> strtoint and its variants are not at risk of passing empty strings,
> so there's not need for concern there.)
>
> BTW, the way you had it coded would allow 'P.Y0M3DT4H5M6S', which
> I don't think we want to allow --- at least, that's rejected by v14
> on my machine.
Oh yeah, good catch. Your patch seems like it should
fix all the issues. Thanks again for the help!
- Joe Koshakow
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2022-04-03 22:56:39 | Re: JSON constructors and window functions |
Previous Message | Thomas Munro | 2022-04-03 22:04:04 | Re: CLUSTER sort on abbreviated expressions is broken |