qemu-cr16/crypto
Markus Armbruster 8cb846db9e crypto: Fix certificate file error handling crash bug
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.  qcrypto_tls_creds_load_cert() then dereferences the
uninitialized @gerr.

Fix by initializing @gerr properly.

Fixes: 9a2fd4347c
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191204093625.14836-2-armbru@redhat.com>
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2019-12-18 08:36:15 +01:00
..
aes.c
afalg.c
afalgpriv.h
afsplit.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
block-luks.c qcrypto-luks: more rigorous header checking 2019-09-26 16:34:02 +01:00
block-luks.h
block-qcow.c
block-qcow.h
block.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
blockpriv.h
cipher-afalg.c
cipher-builtin.c
cipher-gcrypt.c crypto: add support for gcrypt's native XTS impl 2019-10-28 16:20:28 +01:00
cipher-nettle.c crypto: add support for nettle's native XTS impl 2019-10-28 16:45:07 +01:00
cipher.c
cipherpriv.h
desrfb.c
hash-afalg.c
hash-gcrypt.c
hash-glib.c
hash-nettle.c
hash.c
hashpriv.h
hmac-gcrypt.c
hmac-glib.c
hmac-nettle.c
hmac.c
hmacpriv.h
init.c
ivgen-essiv.c
ivgen-essiv.h
ivgen-plain.c
ivgen-plain.h
ivgen-plain64.c
ivgen-plain64.h
ivgen.c
ivgenpriv.h
Makefile.objs crypto: add support for gcrypt's native XTS impl 2019-10-28 16:20:28 +01:00
pbkdf-gcrypt.c
pbkdf-nettle.c
pbkdf-stub.c
pbkdf.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
random-gcrypt.c
random-gnutls.c
random-platform.c
secret.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
tlscreds.c
tlscredsanon.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
tlscredspriv.h
tlscredspsk.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
tlscredsx509.c crypto: Fix certificate file error handling crash bug 2019-12-18 08:36:15 +01:00
tlssession.c
trace-events
xts.c