Re: pg_upgrade segfault (was: pg_migrator segfault)

From: hernan gonzalez <hgonzalez(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_upgrade segfault (was: pg_migrator segfault)
Date: 2010-11-02 19:00:29
Message-ID: AANLkTinkg=BoBgY-S6Mbi+WukciNQPKBYqWi4NDgWMGj@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In pg_upgrade/controldata.c , putenv2 function :

char *envstr = (char *) pg_malloc(ctx, strlen(var)
+ strlen(val) + 1);
sprintf(envstr, "%s=%s", var, val);

Shouldn't it be "+ 2 " instead of "+ 1" ? (one for the '=', plus one for
the null terminating char) ?

I think that fixes it.

Hernán J. González
http://hjg.com.ar/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hernan gonzalez 2010-11-02 19:07:44 Re: pg_upgrade segfault (was: pg_migrator segfault)
Previous Message Tom Lane 2010-11-02 18:29:38 Re: pg_upgrade segfault (was: pg_migrator segfault)