pgsql: Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the
Date: 2008-11-10 14:57:53
Message-ID: 20081110145753.1F7447545A4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
pgsql/contrib/sslinfo:
sslinfo.c (r1.5 -> r1.5.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/sslinfo/sslinfo.c?r1=1.5&r2=1.5.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-11-10 15:18:40 pgsql: pg_do_encoding_conversion cannot return NULL (at least not unless
Previous Message Tom Lane 2008-11-10 14:57:46 pgsql: Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the