[PATCHES] Check for integer overflow in datetime functions

2005-11-30 Thread Michael Fuhr
Check integer conversion for overflow in datetime functions. Problem reported by Christopher Kings-Lynne: http://archives.postgresql.org/pgsql-hackers/2005-11/msg01385.php In one place (line 60 in the patch) the code sets errno to 0 when it should still be 0 after similar code a few lines above

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Neil Conway
On Wed, 2005-11-30 at 19:36 -0700, Michael Fuhr wrote: > Check integer conversion for overflow in datetime functions. It seems a bit laborious to always manually set errno to zero before invoking strtol() (both in the places added by the patch, and all the places that already did that). While it's

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > It seems a bit laborious to always manually set errno to zero before > invoking strtol() (both in the places added by the patch, and all the > places that already did that). While it's only a minor notational > improvement, I wonder if it would be worth add

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Check integer conversion for overflow in datetime functions. Looks reasonable, will check and apply. > This patch should apply cleanly against HEAD and 8.1. If the patch > looks good then I'll submit patches for earlier branches when I get > a chance to

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Alvaro Herrera
Tom Lane wrote: > Don't worry about that, I'll take care of it. I prefer committing all > the branches at once when doing a multi-branch fix (less clutter in > the CVS logs). How do you do that? I have multiple checked-out trees, I assume you do the same and just handle the simultaneous-ness by

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Don't worry about that, I'll take care of it. I prefer committing all >> the branches at once when doing a multi-branch fix (less clutter in >> the CVS logs). > How do you do that? I have multiple checked-out trees, I assume you do

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Check integer conversion for overflow in datetime functions. Applied back to 7.4. The patch would not work in 7.3 because we didn't have the DTERR_ convention back then, and it seems not worth the effort to try to deal with the problem that far back. >

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Magnus Hagander
> BTW, has anyone checked Command Prompt's Subversion > repository? It's a mirror of our anonymous CVS (AFAICT). > I'm using it for reading diffs lately, and it's much nicer to > look at the whole patch as a single diff rather than going a > single file at a time. > > http://projects.command

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Christopher Kings-Lynne
BTW, has anyone checked Command Prompt's Subversion repository? It's a mirror of our anonymous CVS (AFAICT). I'm using it for reading diffs lately, and it's much nicer to look at the whole patch as a single diff rather than going a single file at a time. http://projects.commandprompt.com/projec

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-02 Thread Andrew Dunstan
Magnus Hagander wrote: BTW, has anyone checked Command Prompt's Subversion repository? It's a mirror of our anonymous CVS (AFAICT). I'm using it for reading diffs lately, and it's much nicer to look at the whole patch as a single diff rather than going a single file at a time. http://pr

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-02 Thread Joshua D. Drake
http://projects.commandprompt.com/projects/public/pgsql/browser/trunk/pgsql It has the additional advantage over our current CVSweb that it's set with tabs to 4 spaces, so it looks just like our code is supposed to ... I need to spend some time on it to see if there is a way that I