pgsql: Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the
Date
Msg-id 20081110145738.63C267545A4@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the BIO_s_mem buffer
it was using too soon.  In a situation where pg_do_encoding_conversion is
a no-op, this led to garbage data returned.

In HEAD, also modify the code that's ensuring null termination to make it
a tad more obvious what's happening.

Modified Files:
--------------
    pgsql/contrib/sslinfo:
        sslinfo.c (r1.7 -> r1.8)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/sslinfo/sslinfo.c?r1=1.7&r2=1.8)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Make relhasrules and relhastriggers work like relhasindex, namely
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the