Re: [PATCH v2 01/18] crypto: Fix certificate file error handling crash bug

2019-12-04 Thread Daniel P . Berrangé
On Wed, Dec 04, 2019 at 10:36:08AM +0100, Markus Armbruster wrote: > qcrypto_tls_creds_load_cert() passes uninitialized GError *gerr by > reference to g_file_get_contents(). When g_file_get_contents() fails, > it'll try to set a GError. Unless @gerr is null by dumb luck, this > logs a

[PATCH v2 01/18] crypto: Fix certificate file error handling crash bug

2019-12-04 Thread Markus Armbruster
qcrypto_tls_creds_load_cert() passes uninitialized GError *gerr by reference to g_file_get_contents(). When g_file_get_contents() fails, it'll try to set a GError. Unless @gerr is null by dumb luck, this logs a ERROR_OVERWRITTEN_WARNING warning message and leaves @gerr unchanged.