pgsql: Fix core dump due to null-pointer dereference in to_char() when

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix core dump due to null-pointer dereference in to_char() when
Date: 2009-03-12 00:53:41
Message-ID: 20090312005341.E7317754AD4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix core dump due to null-pointer dereference in to_char() when datetime
format codes are misapplied to a numeric argument. (The code still produces
a pretty bogus error message in such cases, but I'll settle for stopping the
crash for now.) Per bug #4700 from Sergey Burladyan.

Problem exists in all supported branches, so patch all the way back.
In HEAD, also clean up some ugly coding in the nearby cache management
code.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/adt:
formatting.c (r1.116.2.3 -> r1.116.2.4)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/formatting.c?r1=1.116.2.3&r2=1.116.2.4)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-03-12 00:53:49 pgsql: Fix core dump due to null-pointer dereference in to_char() when
Previous Message Tom Lane 2009-03-12 00:53:32 pgsql: Fix core dump due to null-pointer dereference in to_char() when