Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Bill Parker <wp02855(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Date: 2015-06-13 03:41:51
Message-ID: 4457.1434166911@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Michael Paquier wrote:
>> By the way, your patch does not compile properly and is not in-line
>> with the project's code format. See the updated patch attached ;)

> ... or the conventions for allocating memory. Why not just use palloc()?

That's hardly the fault of the proposed patch. But yeah, it seems like
much the best fix here is to get rid of the malloc (and strdup) calls in
this code in favor of using the palloc infrastructure. Even the calls
that *do* have manual failure checks are not compliant with our usual
coding standards.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-06-13 11:41:25 Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Previous Message Alvaro Herrera 2015-06-12 19:47:17 Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x