Re: arrayfuncs: fix read of uninitialized mem - Mailing list pgsql-patches

From Joe Conway
Subject Re: arrayfuncs: fix read of uninitialized mem
Date
Msg-id 41487C98.4070502@joeconway.com
Whole thread Raw
In response to arrayfuncs: fix read of uninitialized mem  (Neil Conway <neilc@samurai.com>)
Responses Re: arrayfuncs: fix read of uninitialized mem
List pgsql-patches
Neil Conway wrote:
>
> Barring any objections, I'll apply the patch within 24 hours.
>

> ***************
> *** 965,978 ****
>        * (including any overhead such as escaping backslashes), and detect
>        * whether each item needs double quotes.
>        */
> !     values = (char **) palloc(nitems * sizeof(char *));
> !     needquotes = (bool *) palloc(nitems * sizeof(bool));

> --- 965,978 ----
>        * (including any overhead such as escaping backslashes), and detect
>        * whether each item needs double quotes.
>        */
> !     values = (char **) palloc(nitems * sizeof(*values));
> !     needquotes = (bool *) palloc(nitems * sizeof(*needquotes));

Personally I prefer the original style here. And I agree with Tom's
nearby comments. But otherwise looks good to me.

Joe

pgsql-patches by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: Turkish translation of initdb.pot
Next
From: Neil Conway
Date:
Subject: Re: arrayfuncs: fix read of uninitialized mem