From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joseph Koshakow <koshy44(at)gmail(dot)com> |
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 19:06:55 |
Message-ID: | 1704792.1649012815@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Joseph Koshakow <koshy44(at)gmail(dot)com> writes:
> How does this patch look? I don't really have any way to test it on
> AIX.
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.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
0001-fix-unportable-strtod-calls.patch | text/x-diff | 6.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Banck | 2022-04-03 19:31:32 | Re: PATCH: add "--config-file=" option to pg_rewind |
Previous Message | Andres Freund | 2022-04-03 19:05:32 | Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations |