Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the BIO_s_mem buffer
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Nov 2008 14:57:46 +0000 (14:57 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Nov 2008 14:57:46 +0000 (14:57 +0000)
commita8fb55c5095f0a42896c775efaf8e4a867cd71bc
tree7e2ac820a3b8647783b0c19a4a556234ae805cc2
parent3d03075f02be60ea79149148893b2c694260492b
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.
contrib/sslinfo/sslinfo.c