Skip site navigation (1) Skip section navigation (2)

Check for integer overflow in datetime functions

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: Check for integer overflow in datetime functions
Date: 2005-12-01 02:36:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Check integer conversion for overflow in datetime functions.  Problem
reported by Christopher Kings-Lynne:

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 (otherwise
the function would have returned an error).  I wasn't sure what
would be preferred: clearing errno again "just to be sure," a comment
explaining why it isn't necessary, or nothing at all.

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 build and test those versions.

Michael Fuhr


pgsql-patches by date

Next:From: Tatsuo IshiiDate: 2005-12-01 07:13:05
Subject: Re: A couple of proposed pgbench changes
Previous:From: Michael FuhrDate: 2005-11-30 23:45:09
Subject: Re: Strange interval arithmetic

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group