[glib-networking: 82/129] Avoid crash if the anchors file is NULL
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking: 82/129] Avoid crash if the anchors file is NULL
- Date: Sat, 2 Feb 2019 22:50:17 +0000 (UTC)
commit 4248aba079193ae6ccf8d6d63896315dd7581d38
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Oct 29 18:54:46 2017 +0100
Avoid crash if the anchors file is NULL
This happens on Win32 if one does not ship a cert.pem file
tls/openssl/gtlsfiledatabase-openssl.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/tls/openssl/gtlsfiledatabase-openssl.c b/tls/openssl/gtlsfiledatabase-openssl.c
index 13ab7e9..10b5df7 100644
--- a/tls/openssl/gtlsfiledatabase-openssl.c
+++ b/tls/openssl/gtlsfiledatabase-openssl.c
@@ -279,6 +279,9 @@ load_certs (const gchar *file_name)
STACK_OF(X509_INFO) *xis = NULL;
gint i;
+ if (file_name == NULL)
+ return NULL;
+
bio = BIO_new_file (file_name, "rb");
if (bio == NULL)
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]