Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U
Date
Msg-id 26301.1030680448@sss.pgh.pa.us
Whole thread Raw
In response to Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U  (Alvaro Herrera <alvherre@atentus.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@atentus.com> writes:
> !         ret=(char *)malloc(sizeof(char)*strlen(t));
> !         strncpy(ret, t, strlen(t));
>
> !         ret=(char *)malloc(sizeof(char)*(strlen(t)+1));
> !         strncpy(ret, t, strlen(t)+1);

What have you got against strdup() ?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U
Next
From: "Dann Corbit"
Date:
Subject: Re: [7.3devl] Using PGPASSWORDFILE with psql requires -U