Fix error handling in be_tls_open_server() - Mailing list pgsql-hackers

From Sergey Shinderuk
Subject Fix error handling in be_tls_open_server()
Date
Msg-id 8db5374d-32e0-6abb-d402-40762511eff2@postgrespro.ru
Whole thread Raw
Responses Re: Fix error handling in be_tls_open_server()
List pgsql-hackers
Hi,

A static analyzer reported a possible pfree(NULL) in 
be_tls_open_server(). Here is a fix. Also handle an error from 
X509_NAME_print_ex().

AFAICS, the error "SSL certificate's distinguished name contains 
embedded null" could not be reached at all, because XN_FLAG_RFC2253 
passed to X509_NAME_print_ex() ensures that null bytes are escaped.

Best regards,

-- 
Sergey Shinderuk        https://postgrespro.com/
Attachment

pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Next
From: Robert Haas
Date:
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.