Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z3OfT-0001xt-09 for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Jun 2015 13:06:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z3OfS-0007O3-BR for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Jun 2015 13:06:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z3OfR-0007MU-Ay for pgsql-bugs@postgresql.org; Fri, 12 Jun 2015 13:06:41 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Z3OfM-000755-Qe; Fri, 12 Jun 2015 13:06:40 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 111A91450065; Fri, 12 Jun 2015 15:06:36 +0200 (CEST) Received: from feivel (wan3.credativ.com [94.79.138.166]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mme@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id F3CAD1450064; Fri, 12 Jun 2015 15:06:35 +0200 (CEST) Received: by feivel (Postfix, from userid 1000) id A982B4051F; Fri, 12 Jun 2015 15:06:35 +0200 (CEST) Date: Fri, 12 Jun 2015 15:06:35 +0200 From: Michael Meskes To: Michael Paquier Cc: Bill Parker , PostgreSQL mailing lists , Michael Meskes Subject: Re: Lack of Sanity Checking in file 'misc.c' for PostgreSQL 9.4.x Message-ID: <20150612130635.GC27586@feivel.credativ.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Fri, Jun 12, 2015 at 03:53:43PM +0900, Michael Paquier wrote: > (Adding Michael Meskes in CC:) Thanks. > Nice catch. Regarding your patch, it seems to me that this is not > enough. I think that we should return NULL with ECPGget_sqlca in case > of an OOM instead of logging a message with ecpg_log and let each code > path decide what to do when sqlca is NULL. Some code paths can > directly use ecpg_raise with ECPG_OUT_OF_MEMORY. Other code paths, > like the ones in error.c will need to show up with appropriate error > messages. Agreed on all accounts. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at gmail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs