From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | msrbugzilla(at)gmail(dot)com |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #6700: Potential Bug in numeric.c |
Date: | 2012-06-20 16:02:42 |
Message-ID: | 20120620160242.GA12024@feivel.credativ.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Jun 20, 2012 at 05:53:14AM +0000, msrbugzilla(at)gmail(dot)com wrote:
> I observed a code clone in the following files. In the function
> PGTYPESnumeric_copy, the variable dst is ensured to be not NULL before
> passing to zero_var(). However, the function PGTYPESnumeric_from_decimal
> does not perform this checking. It will cause an exception when dst is NULL
> and passed to zero_var().
To be honest most of the functions do not check if the parameters are indeed
set. Of course we could easily add the chekc for variable != NULL but that
doesn't ensure that variable points to a valid numeric datatype. Suggestions?
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at googlemail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Chan Pham | 2012-06-20 18:23:44 | log_truncate_on_rotation=on is not truncating |
Previous Message | rikard.pavelic | 2012-06-20 15:53:37 | BUG #6701: IS NOT NULL doesn't work on complex composites |