Search Postgresql Archives

Re: pg_upgrade segfault (was: pg_migrator segfault)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux